-
Notifications
You must be signed in to change notification settings - Fork 149
Conversation
5d5086c
to
b5bde83
Compare
b5bde83
to
c091f80
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of comments @hannesa2 .
By the way, it could be interesting to deprecate those logs with TAG as parameter, and create new ones without it to use them from now on.
owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/utils/Log_OC.java
Outdated
Show resolved
Hide resolved
// Check if current log file size is bigger than the max file size defined | ||
if (mLogFile.length() > MAX_FILE_SIZE) { | ||
isMaxFileSizeReached = true; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if we lose this check? Could logs be huge or how is logs size controlled now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before
There were two files. Old and new. The new overwrites the old. So it means overall log were split into two similar size files and you see always the current.
New
EveryTime you run into Application create a new file with current date is created/reused. The old keeps there till you manually remove it.
Btw, the file-logging is in my point of view pointless, you see current logcat (in release
!) anyways. It was a workaround to see what happens in release
anyhow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will check in QA stage. Just one question: does the rotation happen every time you open the app? does this not lead to log file flooding?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, only if it's really opened. Only a click on the icon does not start app, when it's already open in background.
But when you remove app from task list, it will create a file, but maximum only one per day
owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/utils/Log_OC.java
Show resolved
Hide resolved
We could, but as more sensefull second step, a complete replacement (deletion) of Anyway, I introduced this |
c091f80
to
b084ca7
Compare
I keep this |
Let's continue there #283 |
It's about to change logging from self-made to Timber.
All is encapsulated with a logging lib which I use in several places.
I kept to old Log_OC , to easy migrate and do not touch all files. Especially when you do a huge refactoring
One major advantage for developers:
Before:
NEW: you can click log log line and jump direct to code ! You see the linenumber as well