annotate Sphinx/source/faq/log.rst @ 135:0691978ee3d9

Orthanc 1.3.2
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 18 Apr 2018 15:08:59 +0200
parents 6afcfa34c075
children 80b39dfa1e3c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 .. _log:
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
126
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 124
diff changeset
3 Collecting logs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 124
diff changeset
4 ---------------
124
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
5
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
6 Standard logs
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
7 =============
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
8
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
9 Everytime the Orthanc service starts, it will generate
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
10 a new log file in ``C:\Program Files\Orthanc Server\Logs`` on Windows
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
11 and in ``/var/log/orthanc/`` on Linux.
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
12
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
13 By default, on Windows, if the Orthanc service fails to start, it will
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
14 retry to start 5 times and stop so it does not generate thousands of log files.
23
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15
124
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
16 Log files are named as ``Orthanc.log.YYYYMMDD-hhmmss.ffff`` including
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
17 the date/time when Orthanc was started.
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
18
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
19 Orthanc is not removing old logs so these log files might accumulate
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
20 and consume lot's of space. It's up to you to manage the logs folder
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
21 to make sure you don't fill your disk with logs.
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
22
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
23
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
24
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
25 Generating an exploitable debug log
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
26 ===================================
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
27
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
28 By default, Orthanc logs only the `WARNING` and `ERROR` level
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
29 logs. For your log to be exploitable by the Orthanc community, you must
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
30 generate them with the ``--verbose`` or ``--trace`` to get the `INFO`
cd0be128127d added info about standard logs
amazy
parents: 122
diff changeset
31 and `TRACE` information levels. If you are using
23
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 Orthanc at the command-line, simply add these flags and redirect the
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 standard outputs to some log file.
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 However, if you use packaged versions of Orthanc that runs the server
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 in background, you will have to manually start Orthanc. The sections
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 below explain how to achieve this goal with the officially supported
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 packages.
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 Under Windows
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 ^^^^^^^^^^^^^
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 Under Windows, if you used the official installer:
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 1. Download the `precompiled command-line version
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 <http://www.orthanc-server.com/download-windows.php>`__ of Orthanc.
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 2. Stop the Orthanc service. The actual process depends on your
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 version of Windows.
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51
135
0691978ee3d9 Orthanc 1.3.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 126
diff changeset
52 3. Copy the just-downloaded ``Orthanc-1.3.2-Release.exe`` together
23
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 with your configuration file (that is by default located in
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 ``C:\Orthanc\Configuration.json``) into the same folder
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 (e.g. ``C:\Temp``).
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 4. Type in a command-line shell, to generate the ``Orthanc.log`` file::
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 $ cd C:\Temp
135
0691978ee3d9 Orthanc 1.3.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 126
diff changeset
60 $ Orthanc-1.3.2-Release.exe --verbose Configuration.json > Orthanc.log 2<&1
23
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 5. Restart the Orthanc service.
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 Under Debian GNU/Linux
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 ^^^^^^^^^^^^^^^^^^^^^^
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 1. Stop the Orthanc service::
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 $ sudo /etc/init.d/orthanc stop
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 2. Manually start Orthanc (using the same configuration as the
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 service) and generate the log::
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 $ sudo -u orthanc /usr/sbin/Orthanc --verbose /etc/orthanc/ > Orthanc.log 2>&1
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 3. Restart the Orthanc service::
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 $ sudo /etc/init.d/orthanc start
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 Under Docker
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 ^^^^^^^^^^^^
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 The command-line to be used is::
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86
f99aa6a6f0c9 Generating an Exploitable Log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 $ sudo docker run -a stderr -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc --verbose /etc/orthanc > Orthanc.log 2>&1