Skip to content

Commit 9f3169c

Browse files
authored
Merge pull request #24 from sy-c/master
code cleanup
2 parents 9f9dde9 + 1664b12 commit 9f3169c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+7916
-7162
lines changed

example/exampleLog.cxx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// Copyright CERN and copyright holders of ALICE O2. This software is
2+
// distributed under the terms of the GNU General Public License v3 (GPL
3+
// Version 3), copied verbatim in the file "COPYING".
4+
//
5+
// See http://alice-o2.web.cern.ch/license for full licensing information.
6+
//
7+
// In applying this license CERN does not waive the privileges and immunities
8+
// granted to it by virtue of its status as an Intergovernmental Organization
9+
// or submit itself to any jurisdiction.
10+
111
#include <InfoLogger/InfoLogger.hxx>
212
using namespace AliceO2::InfoLogger;
313
int main()

include/InfoLogger/InfoLogger.h

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// Copyright CERN and copyright holders of ALICE O2. This software is
2+
// distributed under the terms of the GNU General Public License v3 (GPL
3+
// Version 3), copied verbatim in the file "COPYING".
4+
//
5+
// See http://alice-o2.web.cern.ch/license for full licensing information.
6+
//
7+
// In applying this license CERN does not waive the privileges and immunities
8+
// granted to it by virtue of its status as an Intergovernmental Organization
9+
// or submit itself to any jurisdiction.
10+
111
/// \file InfoLogger.h
212
/// \brief C interface for the InfoLogger logging interface.
313
///
@@ -12,14 +22,13 @@ extern "C" {
1222
#endif
1323

1424
/// Handle to infoLogger connection
15-
typedef void *InfoLoggerHandle;
16-
25+
typedef void* InfoLoggerHandle;
1726

1827
/// Open infoLogger connection.
1928
/// Resulting handle should be called by furhter InfoLogger function calls.
2029
/// \param handle Variable where the resulting handle is stored, on success. Result by reference.
2130
/// \return 0 on success, an error code otherwise.
22-
int infoLoggerOpen(InfoLoggerHandle *handle);
31+
int infoLoggerOpen(InfoLoggerHandle* handle);
2332

2433
/// Close infoLogger connection.
2534
/// \param handle Handle to InfoLogger, as created by a previous infoLoggerOpen() call.
@@ -31,25 +40,23 @@ int infoLoggerClose(InfoLoggerHandle handle);
3140
/// \param message NUL-terminated string message to push to the log system. It uses the same format as specified for printf(), and the function accepts additionnal formatting parameters.
3241
/// \param ... Extra optionnal parameters for formatting.
3342
/// \return 0 on success, an error code otherwise.
34-
int infoLoggerLog(InfoLoggerHandle handle, const char *message, ...) __attribute__((format(printf, 2, 3)));
43+
int infoLoggerLog(InfoLoggerHandle handle, const char* message, ...) __attribute__((format(printf, 2, 3)));
3544

3645
/// Log a message, with a list of arguments of type va_list.
3746
/// \param handle Handle to InfoLogger, as created by a previous infoLoggerOpen() call.
3847
/// \param message NUL-terminated string message to push to the log system. It uses the same format as specified for printf(), and the function accepts additionnal formatting parameters.
3948
/// \param ap Variable list of arguments (c.f. vprintf)
4049
/// \return 0 on success, an error code otherwise.
41-
int infoLoggerLogV(InfoLoggerHandle handle, const char *message, va_list ap) __attribute__((format(printf, 2, 0)));
50+
int infoLoggerLogV(InfoLoggerHandle handle, const char* message, va_list ap) __attribute__((format(printf, 2, 0)));
4251

4352
/// Functions to log messages of type Info,Warning,Error,Fatal,Debug
4453
/// \see { infoLoggerLog }
45-
int infoLoggerLogInfo(InfoLoggerHandle handle, const char *message, ...) __attribute__((format(printf, 2, 3)));
46-
int infoLoggerLogWarning(InfoLoggerHandle handle, const char *message, ...) __attribute__((format(printf, 2, 3)));
47-
int infoLoggerLogError(InfoLoggerHandle handle, const char *message, ...) __attribute__((format(printf, 2, 3)));
48-
int infoLoggerLogFatal(InfoLoggerHandle handle, const char *message, ...) __attribute__((format(printf, 2, 3)));
49-
int infoLoggerLogDebug(InfoLoggerHandle handle, const char *message, ...) __attribute__((format(printf, 2, 3)));
50-
54+
int infoLoggerLogInfo(InfoLoggerHandle handle, const char* message, ...) __attribute__((format(printf, 2, 3)));
55+
int infoLoggerLogWarning(InfoLoggerHandle handle, const char* message, ...) __attribute__((format(printf, 2, 3)));
56+
int infoLoggerLogError(InfoLoggerHandle handle, const char* message, ...) __attribute__((format(printf, 2, 3)));
57+
int infoLoggerLogFatal(InfoLoggerHandle handle, const char* message, ...) __attribute__((format(printf, 2, 3)));
58+
int infoLoggerLogDebug(InfoLoggerHandle handle, const char* message, ...) __attribute__((format(printf, 2, 3)));
5159

5260
#ifdef __cplusplus
5361
}
5462
#endif
55-

0 commit comments

Comments
 (0)