r/javahelp • • Feb 03 '21

Looking for a sample Java Spring Boot log file, produced by a real application

I realize this might be an odd request. I'm conducting an interview for an entry-level operations support engineer. As part of my initial questions, I plan on presenting the candidate with a log file containing the output of a Java Spring Boot application where the app supposedly ran into some trouble. The candidate will be asked to, using their favorite Linux text viewer/editor, identify what the problem was (by pointing out the exceptions or errors), the timestamp when it started, and the timestamp when it ended. It's a very basic check for the candidate's ability to inspect a log file while checking if they know how to use a text viewer in the terminal. My challenge here is that I cannot give the candidate any of our application log files (due to my company policy) and after some basic Googling I simply could not find a proper log file (only snippets).

So the request is, can anyone share a log file, ideally one spanning over an entire day and having a few thousand lines, where there are some exceptions buried somewhere in the middle? I would prefer any log files not containing sensitive information, of course.

4 Upvotes

14 comments sorted by

•

u/AutoModerator Feb 03 '21

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions

  • You include any and all error messages in full

  • You ask clear questions

  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

    Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit: empty line before the code, each code line indented by 4 spaces, new reddit: https://imgur.com/a/fgoFFis) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/[deleted] Feb 03 '21

Mostly just NPE's and that too on data which is probably manually updated in DB by PROD support

-1

u/PhatBaja Feb 03 '21

I think that might work. Are you able to share a log file?

1

u/[deleted] Feb 03 '21

company policy

2

u/knoam Feb 03 '21

There's the Pet Shop Spring Boot sample app you could pull down and spin up. Or make a project with JHipster.

-4

u/PhatBaja Feb 03 '21

Pet Shop Spring Boot

Thanks, that could work but it would require me to let it run for a while, simulate a situation so exceptions would appear in the logs, etc... it would be a lot easier to just use a real app log that's already populated with lots of info and some errors and/or warnings so I was hoping someone could just share such file.

1

u/joshuaherman Feb 03 '21

No one is going to share their server log with you due to security implications.

0

u/PhatBaja Feb 03 '21

I understand that... thought it would be worth a shot in case someone has already generated some logs or had easy access to a file without any sensitive data.

1

u/joshuaherman Feb 03 '21

Anything that is worth what you're looking for by nature is sensitive data. The best way to do it is to build your own server and learn in the process AND you can seek what you are after.

5

u/wildjokers Feb 03 '21

You want someone to share a log file from their production logs when your own company doesn't allow this? Why would you think another company would allow a production log file file to be shared with a stranger on the internet?

Your best bet is to just obfuscate your own log file. Like change all the characters in the body of the log message to a random character. But leave the "header" part of the log entry intact and probably leave the word "exception" intact.

1

u/[deleted] Feb 03 '21

Btw If you could most probably use winscp and check the file in notepad++
Or
Have web based log viewers like splunk are already a norm everywhere

1

u/_jetrun Feb 04 '21

My challenge here is that I cannot give the candidate any of our application log files (due to my company policy) and after some basic Googling I simply could not find a proper log file (only snippets).

Then obfuscate it. Scramble class names and remove any sensitive information. Or is that too much work for you?

1

u/nutrecht Lead Software Engineer / EU / 20+ YXP Feb 04 '21

My challenge here is that I cannot give the candidate any of our application log files (due to my company policy)

And you think other devs don't have that same issue?

If you can't show real log files, create one by hand. It's not rocket science. You could easily have done this in the time it took you to post this and respond to comments.

1

u/Yithar Intermediate Brewer Feb 04 '21

As stated, just modify a real one such that no sensitive information is leaked.

I don't really think what you're looking is available publicly.