This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 10 - Pages: 1 - Last Post: 10 May 26, 17:12 Last Post By: phil44 Threads: [ Previous | Next ]
phil44

Posts: 199
Registered: 18-Jun-2010
Log files questions
Posted: 9 May 26, 11:19
 
  Click to reply to this thread Reply
Could you tell me where the log files are located?

I would sometimes like to find the logs of a previous execution of jAlbum, but I don't know where the log file(s) are located, or even if the logs are kept from one execution to another.
MarkusD

Posts: 905
Registered: 13-Apr-2006
Re: Log files questions
Posted: 9 May 26, 12:30   in response to: phil44 in response to: phil44
 
  Click to reply to this thread Reply
phil44 wrote:
Could you tell me where the log files are located?
There are no log files. Everything is just in the console. If you close JA, everything is gone.
phil44

Posts: 199
Registered: 18-Jun-2010
Re: Log files questions
Posted: 9 May 26, 14:17   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
Ah, what a shame!
JeffTucker

Posts: 8,490
Registered: 31-Jan-2006
Re: Log files questions
Posted: 9 May 26, 14:42   in response to: phil44 in response to: phil44
 
  Click to reply to this thread Reply
An interesting idea. Perhaps the core could keep a running log file in the user's config directory, showing the contents of the console, with some kind of date/time separator. It could be self-pruning, like limiting it to ten days' worth, so that it doesn't get huge.

I'm not sure how many users would find it useful, but I've had occasion to wonder if I missed an error message in an album build that I did an hour ago, but which is now gone.
phil44

Posts: 199
Registered: 18-Jun-2010
Re: Log files questions
Posted: 9 May 26, 18:12   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
Perhaps a logging framework is being used, and in that case, a simple, well-placed configuration file could allow the framework to also save logs to a file...
MarkusD

Posts: 905
Registered: 13-Apr-2006
Re: Log files questions
Posted: 9 May 26, 22:21   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
JeffTucker wrote:
I'm not sure how many users would find it useful, but I've had occasion to wonder if I missed an error message in an album build that I did an hour ago, but which is now gone.
I missed this feature too, from the beginning. An application like JA without a real log file, this is just unthinkable. And about the size of log files. I have this voice saying that space on a hard drive is nearly endless. Wasn't that voice, you, Jeff? ;-)

Logging to a file would be highly appreciated. Make it an optional feature, so only those who realy enable it are "flooded" with them.
davidekholm

Posts: 3,999
Registered: 18-Oct-2002
Re: Log files questions
Posted: 9 May 26, 22:28   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
Let me know in more detail what you're looking for. Adding file based logging shouldn't be hard.
MarkusD

Posts: 905
Registered: 13-Apr-2006
Re: Log files questions
Posted: 9 May 26, 22:56   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
David, the answer is very easy. Just write in a log file what is alread in the console.

Keep in mind, that according to the logging level log files can grow very very quickly.

In our own applications we start a new log file after 6 MB, which we decided is a good size maybe 30 years ago, and still is a good size.

So the actual log file maybe is "jalbum.log" and an older log file is jalbum 2026 09 23 45.log.

That's all.
phil44

Posts: 199
Registered: 18-Jun-2010
Re: Log files questions
Posted: 10 May 26, 11:04   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
What I hope is to be able to find, after stopping jAlbum (following a problem like a freeze or something else), error messages previously displayed in the console.

Personally, I think a single, reasonably sized rolling file (Markus's 6 MB seems fine) would suffice, generated, for example, in the Config/log directory.

Markus raised an interesting point: in the console, we can clearly see that there are log entries generated by a logging framework (for example, 'logger(Level.WARNING, ...);' in the code) that are displayed as "WARNING: ... / May 09, 2026 9:12:05 ...", and others that don't have this format and probably result from a simple print statement. Ideally, both forms should be in the log file.
davidekholm

Posts: 3,999
Registered: 18-Oct-2002
Re: Log files questions
Posted: 10 May 26, 13:43   in response to: phil44 in response to: phil44
 
  Click to reply to this thread Reply
Thanks. To address UI freezing, ensure you have "Preferences - Advanced - General - Use watchdog" ticked, then if the UI freezes, wait 20s, then jAlbum should generate a "thread-dump.txt" file. Pass that file to me for investigation.
phil44

Posts: 199
Registered: 18-Jun-2010
Re: Log files questions
Posted: 10 May 26, 17:12   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Noted. I will do that on next freeze.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums