-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DDFileLogger: fixed isLogFile: method for timestamp log naming convention #190
DDFileLogger: fixed isLogFile: method for timestamp log naming convention #190
Conversation
…timestamp log naming convention
@bpoplauschi @rivera-ernesto Now logs have .txt file format. Maybe there is sense to change it to .log? |
I think that's a good idea. That's what Apple does too. Do you want to add that change here? |
@@ -233,28 +233,59 @@ - (NSString *)logsDirectory | |||
|
|||
- (BOOL)isLogFile:(NSString *)fileName | |||
{ | |||
// A log file has a name like "log-<uuid>.txt", where <uuid> is a HEX-string of 6 characters. | |||
// | |||
// For example: log-DFFE99.txt |
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.
In case we with to *.log the file prefix wouldn't be needed anymore.
Maybe something like MobileSafari 2013-12-03 17-14.log
where you could easily distinguish logs.
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 agree, this MobileSafari 2013-12-03 17-14.log
looks right
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.
This format looks good. But I think we should leave old formats for compatibility. Something like this:
typedef enum {
// Application name followed by date.
// Example: MobileSafari 2013-12-03 17-14.log
DDLogFileNamingConventionDefault,
// old file naming convetion, using UUID.
// Example: log-DFFE99.txt
DDLogFileNamingConventionUUID,
// old file naming convention, using UTC time in RFC 3339 format.
// Example: log-2013-12-20T15-20-30Z.txt
DDLogFileNamingConventionTimestamp
} DDLogFileNamingConvention;
Sure, if it's not too much hassle. On the other hand there's not really a compatibility issue that would really break by using a new (and better) naming convention. Personally I would keep only the last one as it already has both:
This is easy to update for client apps, and more important, easier to maintain and test for us! |
Related to #174. |
Well, then we can get rid of other formats and those enum. It simplifies the code. The only thing that can be annoying for users is that DDLogFileNamingConvention would be removed and they'd have to modify their code. |
That would just be a one-time change for them. |
#191 replaces this. |
About versioning. I just noticed that // CocoaLumberjack
#define COCOAPODS_POD_AVAILABLE_CocoaLumberjack
// This library does not follow semantic-versioning,
// so we were not able to define version macros.
// Please contact the author.
// Version: 1.6.5.1.
// CocoaLumberjack/Core
#define COCOAPODS_POD_AVAILABLE_CocoaLumberjack_Core
// This library does not follow semantic-versioning,
// so we were not able to define version macros.
// Please contact the author.
// Version: 1.6.5.1.
// CocoaLumberjack/Extensions
#define COCOAPODS_POD_AVAILABLE_CocoaLumberjack_Extensions
// This library does not follow semantic-versioning,
// so we were not able to define version macros.
// Please contact the author.
// Version: 1.6.5.1. |
@rivera-ernesto Will releasing new version with right tag fix this? Or we have to remove 1.6.5.1 tag (which could hurt some of users)? If new version is enought, than we can release 1.7 with #191. Well, it could be 1.6.6, but as to me changing log file name format is MINOR change. |
@rivera-ernesto Good catch. This was far from ideal, but I think releasing a 1.7 would get us back in trend. This way it will be easier to release a patch with 1.7.x, if needed. |
I would prefer keeping 1.6.x releases until we get some bigger changes. That said we should release now as #194 will require more work. |
I can go with both 1.6.6 or 1.7.0, but I think there are more arguments in favour of 1.7.0:
I'd suggest we start doing releases by the book. |
We don't have to release 2.0 at all. We can always go 1.10.0 and 1.11.0. ;) |
Ok, 1.7.0 ;) Can you please do it? I have something to finish here... |
Ok, will do this asap. |
Release 1.7.0 is ready, Cocoapods specs pull request: CocoaPods/Specs#6295 |
Great! Thanks @bpoplauschi |
Issue #189.
isLogFile: method wasn't processing DDLogFileNamingConventionTimestamp. This if fixed now.
Also I've changed timestamp format. In previous format colons were automatically converted to slashes
/
due to file naming convention - colons are forbidden in file name.