Mercurial > hg > orthanc
annotate OrthancServer/Resources/Samples/CppHelpers/Logging/OrthancLogger.cpp @ 4990:b1fe3b44ce1d
fix
author | Alain Mazy <am@osimis.io> |
---|---|
date | Sun, 01 May 2022 10:47:08 +0200 |
parents | 43e613a7756b |
children | 0ea402b4d901 |
rev | line source |
---|---|
4829
c847b0dfd255
added missing copyright headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
1 /** |
c847b0dfd255
added missing copyright headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
2 * Orthanc - A Lightweight, RESTful DICOM Store |
c847b0dfd255
added missing copyright headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
c847b0dfd255
added missing copyright headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
4870
43e613a7756b
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4831
diff
changeset
|
5 * Copyright (C) 2017-2022 Osimis S.A., Belgium |
43e613a7756b
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4831
diff
changeset
|
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
4829
c847b0dfd255
added missing copyright headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
7 * |
c847b0dfd255
added missing copyright headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
8 * This program is free software: you can redistribute it and/or |
c847b0dfd255
added missing copyright headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
9 * modify it under the terms of the GNU General Public License as |
c847b0dfd255
added missing copyright headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
10 * published by the Free Software Foundation, either version 3 of the |
c847b0dfd255
added missing copyright headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
11 * License, or (at your option) any later version. |
c847b0dfd255
added missing copyright headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
12 * |
c847b0dfd255
added missing copyright headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
13 * This program is distributed in the hope that it will be useful, but |
c847b0dfd255
added missing copyright headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
14 * WITHOUT ANY WARRANTY; without even the implied warranty of |
c847b0dfd255
added missing copyright headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
c847b0dfd255
added missing copyright headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
16 * General Public License for more details. |
c847b0dfd255
added missing copyright headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
17 * |
c847b0dfd255
added missing copyright headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
18 * You should have received a copy of the GNU General Public License |
c847b0dfd255
added missing copyright headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
c847b0dfd255
added missing copyright headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
20 **/ |
c847b0dfd255
added missing copyright headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
21 |
c847b0dfd255
added missing copyright headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
22 |
3460 | 23 #include "OrthancLogger.h" |
24 #include "Logging.h" | |
25 | |
26 namespace OrthancHelpers | |
27 { | |
28 | |
29 void OrthancLogger::Trace(const char *message) | |
30 { | |
31 VLOG(1) << GetContext() << " " << message; | |
32 } | |
33 | |
34 void OrthancLogger::Trace(const std::string& message) | |
35 { | |
36 VLOG(1) << GetContext() << " " << message; | |
37 } | |
38 | |
39 void OrthancLogger::Info(const char *message) | |
40 { | |
41 LOG(INFO) << GetContext() << " " << message; | |
42 } | |
43 | |
44 void OrthancLogger::Info(const std::string& message) | |
45 { | |
46 LOG(INFO) << GetContext() << " " << message; | |
47 } | |
48 | |
49 void OrthancLogger::Warning(const char *message) | |
50 { | |
51 LOG(WARNING) << GetContext() << " " << message; | |
52 } | |
53 | |
54 void OrthancLogger::Warning(const std::string& message) | |
55 { | |
56 LOG(WARNING) << GetContext() << " " << message; | |
57 } | |
58 | |
59 void OrthancLogger::Error(const char *message) | |
60 { | |
61 LOG(ERROR) << GetContext() << " " << message; | |
62 } | |
63 | |
64 void OrthancLogger::Error(const std::string& message) | |
65 { | |
66 LOG(ERROR) << GetContext() << " " << message; | |
67 } | |
68 } |