Permalink
Browse files

LibComponentLogging-SystemLog-1.2.1

  • Loading branch information...
2 parents 03df860 + b80e553 commit 53d42d9033e302d44e263c5d95e880c051ad2e78 @aharren committed Aug 26, 2012
Showing with 52 additions and 15 deletions.
  1. +26 −11 LCLSystemLog.h
  2. +23 −1 LCLSystemLog.m
  3. +1 −1 LCLSystemLogConfig.template.h
  4. +1 −1 README.md
  5. +1 −1 lcl_config_logger.h → lcl_config_logger.template.h
View
@@ -3,7 +3,7 @@
// LCLSystemLog.h
//
//
-// Copyright (c) 2008-2011 Arne Harren <ah@0xc0.de>
+// Copyright (c) 2008-2012 Arne Harren <ah@0xc0.de>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -24,8 +24,8 @@
// THE SOFTWARE.
#define _LCLSYSTEMLOG_VERSION_MAJOR 1
-#define _LCLSYSTEMLOG_VERSION_MINOR 1
-#define _LCLSYSTEMLOG_VERSION_BUILD 4
+#define _LCLSYSTEMLOG_VERSION_MINOR 2
+#define _LCLSYSTEMLOG_VERSION_BUILD 1
#define _LCLSYSTEMLOG_VERSION_SUFFIX ""
@@ -201,17 +201,26 @@
# endif
#endif
#if _lcl_logger_autoreleasepool_arc
-#define _lcl_logger_autoreleasepool_begin \
- @autoreleasepool {
-#define _lcl_logger_autoreleasepool_end \
- }
+# define _lcl_logger_autoreleasepool_begin \
+ @autoreleasepool {
+# define _lcl_logger_autoreleasepool_end \
+ }
#else
-#define _lcl_logger_autoreleasepool_begin \
- NSAutoreleasePool *_lcl_logger_autoreleasepool = [[NSAutoreleasePool alloc] init];
-#define _lcl_logger_autoreleasepool_end \
- [_lcl_logger_autoreleasepool release];
+# define _lcl_logger_autoreleasepool_begin \
+ NSAutoreleasePool *_lcl_logger_autoreleasepool = [[NSAutoreleasePool alloc] init];
+# define _lcl_logger_autoreleasepool_end \
+ [_lcl_logger_autoreleasepool release];
#endif
+#ifndef _LCL_NO_IGNORE_WARNINGS
+# ifdef __clang__
+ // Ignore some warnings about variadic macros when using '-Weverything'.
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wunknown-pragmas"
+# pragma clang diagnostic ignored "-Wvariadic-macros"
+# pragma clang diagnostic ignored "-Wpedantic"
+# endif
+#endif
// Define the _lcl_logger macro which integrates LCLSystemLog as a logging
// back-end for LibComponentLogging and pass the header of a log component as
@@ -228,3 +237,9 @@
_lcl_logger_autoreleasepool_end \
}
+#ifndef _LCL_NO_IGNORE_WARNINGS
+# ifdef __clang__
+# pragma clang diagnostic pop
+# endif
+#endif
+
View
@@ -3,7 +3,7 @@
// LCLSystemLog.m
//
//
-// Copyright (c) 2008-2011 Arne Harren <ah@0xc0.de>
+// Copyright (c) 2008-2012 Arne Harren <ah@0xc0.de>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -436,7 +436,18 @@ + (void)logWithIdentifier:(const char *)identifier_c level:(uint32_t)level
_LCLSystemLog_autoreleasepool_begin
// create log message
+# ifndef _LCL_NO_IGNORE_WARNINGS
+# ifdef __clang__
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wformat-nonliteral"
+# endif
+# endif
NSString *message = [[NSString alloc] initWithFormat:format arguments:args];
+# ifndef _LCL_NO_IGNORE_WARNINGS
+# ifdef __clang__
+# pragma clang diagnostic pop
+# endif
+# endif
# if !__has_feature(objc_arc)
[message autorelease];
# endif
@@ -504,7 +515,18 @@ + (void)logWithIdentifier:(const char *)identifier_c lclLevel:(uint32_t)lclLevel
_LCLSystemLog_autoreleasepool_begin
// create log message
+# ifndef _LCL_NO_IGNORE_WARNINGS
+# ifdef __clang__
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wformat-nonliteral"
+# endif
+# endif
NSString *message = [[NSString alloc] initWithFormat:format arguments:args];
+# ifndef _LCL_NO_IGNORE_WARNINGS
+# ifdef __clang__
+# pragma clang diagnostic pop
+# endif
+# endif
# if !__has_feature(objc_arc)
[message autorelease];
# endif
@@ -3,7 +3,7 @@
// LCLSystemLogConfig.h
//
//
-// Copyright (c) 2008-2011 Arne Harren <ah@0xc0.de>
+// Copyright (c) 2008-2012 Arne Harren <ah@0xc0.de>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
View
@@ -98,7 +98,7 @@ The following Git repositories are related to this repository:
## Copyright and License
-Copyright (c) 2008-2011 Arne Harren <ah@0xc0.de>
+Copyright (c) 2008-2012 Arne Harren <ah@0xc0.de>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -3,7 +3,7 @@
// lcl_config_logger.h
//
//
-// Copyright (c) 2008-2011 Arne Harren <ah@0xc0.de>
+// Copyright (c) 2008-2012 Arne Harren <ah@0xc0.de>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal

0 comments on commit 53d42d9

Please sign in to comment.