# \--log-file-log-level vs. --log-level (and --log-file-log-filter), and, how many log files are there, and, what are the different logs, and, what is the meaning of the levels

**URL:** https://forum.duplicati.com/t/log-file-log-level-vs-log-level-and-log-file-log-filter-and-how-many-log-files-are-there-and-what-are-the-different-logs-and-what-is-the-meaning-of-the-levels/6084
**Category:** Uncategorized
**Created:** [January 21, 2019, 10:29pm UTC](https://forum.duplicati.com/t/log-file-log-level-vs-log-level-and-log-file-log-filter-and-how-many-log-files-are-there-and-what-are-the-different-logs-and-what-is-the-meaning-of-the-levels/6084 "2019-01-21T22:29:52Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![johnvk](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/j/f17d59/32.png) [@johnvk](https://forum.duplicati.com/u/johnvk)
#### Post date: [January 21, 2019, 10:29pm UTC](https://forum.duplicati.com/t/log-file-log-level-vs-log-level-and-log-file-log-filter-and-how-many-log-files-are-there-and-what-are-the-different-logs-and-what-is-the-meaning-of-the-levels/6084/1 "2019-01-21T22:29:52Z")

</div>

**EDIT:** added @JonMikelV’s corrections (Thanks JonMikeIV!).  
**EDIT:** added @kenkendk’s info (Thanks kenkendk!).

I would like to know more about “logging” because I want to capture enough log data to be useful for debugging / forum posting, but I don’t want to fill up my disk with spew.

- EDIT: `--log-file=filename --log-file-log-level=verbose` seems to be ideal

First, what’s the difference between advanced options [`--log-file-log-level`](https://duplicati.readthedocs.io/en/latest/06-advanced-options/#log-file-log-level) and [`--log-level`](https://duplicati.readthedocs.io/en/latest/06-advanced-options/#log-level)

- **ANSWER** : `--log-level` is deprecated; use **`--log-file-log-level`** (Oh, there’s [this](https://forum.duplicati.com/t/new-log-system-with-filters/2913) I now see)

To quote the manual (as of 01/21/2019):

> ### [log-file-log-level](https://duplicati.readthedocs.io/en/latest/06-advanced-options/#log-file-log-level)
> 
> `--log-file-log-level = Warning`  
> Log file information level

and

> (EDIT: deprecated – @johnvk)
> 
> ### [log-level](https://duplicati.readthedocs.io/en/latest/06-advanced-options/#log-level)
> 
> `--log-level = Warning`  
> Specifies the amount of log information to write into the file specified by `--log-file`.
> 
> (EDIT: deprecated – @johnvk)

Ironically, the option that does _not_ have “`file`” in its name (ie, `--log-level`), specifically mentions the `--log-file` option in its description.

Is there some log file that is _not_ specified with `--log-file`?

- **ANSWER** : No, not that’s affected by any of these options

This post ([Logging levels Values](https://forum.duplicati.com/t/logging-levels-values/2543)) from a year ago (feb 2018) seems to suggest that the `--log-level` option doesn’t actually work.

Indeed, what I see most often suggested in this form is `--log-file` with `--log-file-log-level` eg, most recently [here](https://forum.duplicati.com/t/onedrive-personal-back-ups-suddenly-started-failing-with-channel-is-retired-and-a-task-has-been-cancelled/6069/4).

- **ANSWER** : (I repeat) `--log-level` is deprecated; use **`--log-file-log-level`**

(EDIT) Furthermore, once `--log-file` contents are set by `--log-file-log-level` they can then be filtered down or augmented by `--log-file-log-filter`

And what are all the different logs? Here’s what I’ve gathered so far:

- User-controlled log:
  - File created with `--log-file`. Affected by `--log-file-log-level` and `--log-file-log-filter`

- Predefined logs:
  - Job log file, under the GUI → job details drop-down → Reporting: → Show log… → has:
    - **General** - always on; hard-coded contents; each logfile has the word `Result` on it and appears to be a “result log” I guess
    - **Remote** - always on; hard-coded contents; which appears to be a rolling log of multiple job runs in order.

  - Under GUI → About → Show log → there are
    - **Stored** - which appears to be stored logs from when ‘Live’ was turned on.
    - **Live** - which is only active if you set a level

- ~~Any others?~~

Dare I ask which of the advanced log file options apply to which of these various log outputs?

- **ANSWER** : `--log-file-log-level` and `--log-file-log-filter` only affect the user-controlled logfile created by `--log-file=`

And, finally, what are the different levels? This reply #2 ([Logging levels Values - #2 by Pectojin](https://forum.duplicati.com/t/logging-levels-values/2543/2)) suggests that the `--log-file-log-level` values are the same as the GUI.

The GUI for “Live” log lists these options in this ~~(apparently random)~~ order:

1. `Disabled`
2. `ExplicitOnly`
3. `Profiling`
4. `Verbose`
5. `Retry`
6. `Information`
7. `DryRun`
8. `Warning`
9. `Error`

~~Those are not in alphabetical order, and it doesnt look like they’re in verbosity order (I don’t see any way the sequence `Disabled` … `Warning` … `Error` can be consistently increasing or decreasing in verbosity).~~

Except for the first 2, these are in order of _decreasing_ verbosity. Ie `Profiling` is the most verbose, and `Error` is the least verbose.

Some notes about the levels and their order of verbosity:

If you use `--log-file-log-level=warning` you get warning AND errors.

`profiling` is the highest and most verbose including all levels below it.

So, `profiling` outputs more than `verbose` .

As might be expected, `verbose` outputs more than `information` .

`ExplicitOnly` is special and not normally useful.

Interestingly, `DryRun` includes `Errors` and `Warnings` too. Makes sense I guess.

And `Retry` includes everything `DryRun` includes, plus `Informationals` , plus everything at the `Retry` level itself.

But both `verbose` and `profiling` contain both `DryRun` and `Retry` so there might not be much use for those more specific levels.

~~Using a hint from this reply #4 ([OneDrive (personal) back-ups suddenly started failing with "Channel is retired" and "A task has been cancelled" - #4 by ts678](https://forum.duplicati.com/t/onedrive-personal-back-ups-suddenly-started-failing-with-channel-is-retired-and-a-task-has-been-cancelled/6069/4)), and [reply #2 here](https://forum.duplicati.com/t/log-file-log-level-vs-log-level-and-how-many-log-files-are-there-and-what-are-the-different-logs-and-what-is-the-meaning-of-the-levels/6084/2) I list these levels in increasing-verbosity order to the best of my knowledge:~~

[previous list removed]

~~Those last two look like special cases somehow.~~

~~Or is each of these a flag that get all 'OR’ed together (Ie, print log line if `Explicit ` OR `Error` OR `Retry`)?~~

Thanks for all your help so far, and in advance for this one ☀

(Moderators: please feel free to edit this post to correct it and keep it up to date)

---

<div class="post-metadata">

### Author: ![JonMikelV](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@JonMikelV](https://forum.duplicati.com/u/JonMikelV)
#### Post date: [January 21, 2019, 11:40pm UTC](https://forum.duplicati.com/t/log-file-log-level-vs-log-level-and-log-file-log-filter-and-how-many-log-files-are-there-and-what-are-the-different-logs-and-what-is-the-meaning-of-the-levels/6084/2 "2019-01-21T23:40:43Z")

</div>

The 4 database logs you listed are they only ones and they always log - there are no parameters (I know if) to adjust their log levels.

The --log-Ievel parameter is deprecated and only works with older versions of Duplicati.

The verbose of the options available for --log-file-log-level varies a bit depending on the action being taken and warnings/errors that happen, but on the whole if say your verbosity order is good except I’d move ExplicitOnly after Warning.

Just to confuse you more, don’t forget the log-filter options that will include/exclude message the regardless of the log-level. I use this for logging JUST database calls, for example.

---

<div class="post-metadata">

### Author: ![johnvk](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/j/f17d59/32.png) [@johnvk](https://forum.duplicati.com/u/johnvk)
#### Post date: [January 22, 2019, 3:31am UTC](https://forum.duplicati.com/t/log-file-log-level-vs-log-level-and-log-file-log-filter-and-how-many-log-files-are-there-and-what-are-the-different-logs-and-what-is-the-meaning-of-the-levels/6084/3 "2019-01-22T03:31:52Z")

</div>

Can you proofread my edits?

---

<div class="post-metadata">

### Author: ![kenkendk](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kenkendk/32/5305_2.png) [@kenkendk](https://forum.duplicati.com/u/kenkendk)
#### Post date: [January 22, 2019, 8:31am UTC](https://forum.duplicati.com/t/log-file-log-level-vs-log-level-and-log-file-log-filter-and-how-many-log-files-are-there-and-what-are-the-different-logs-and-what-is-the-meaning-of-the-levels/6084/4 "2019-01-22T08:31:09Z")

</div>

> [@johnvk](#):
>
> Those are not in alphabetical order, and it doesnt look like they’re in verbosity order (I don’t see any way the sequence `Disabled` … `Warning` … `Error` can be consistently increasing or decreasing in verbosity).

They are intended to be in verbosity order, as defined here:

> <https://github.com/duplicati/duplicati/blob/master/Duplicati/Library/Logging/Log.cs#L29-L63>

The `ExplicitOnly` level is special. The messages emitted with the level `ExplicitOnly` are only emitted if a filter matches them directly, or the level is set to `ExplicitOnly`. These messages are generally just noise, as they are expected messages (such as failing to load some native libraries during backend loading, etc).

I have done some work trying to make the logging more sane, but a core issue is that the backup itself (which can also run on the commandline) is emitting some log messages, and the server (which is showing the UI, running the tasks, and having the scheduler) is also emitting some messages. I am mentioning this as it might help to understand it until we figure out a better way of presenting the messages.

---

<div class="post-metadata">

### Author: ![johnvk](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/j/f17d59/32.png) [@johnvk](https://forum.duplicati.com/u/johnvk)
#### Post date: [January 28, 2019, 10:46pm UTC](https://forum.duplicati.com/t/log-file-log-level-vs-log-level-and-log-file-log-filter-and-how-many-log-files-are-there-and-what-are-the-different-logs-and-what-is-the-meaning-of-the-levels/6084/5 "2019-01-28T22:46:34Z")

</div>

Thanks so much @kenkendk that clears it up.

I will update my OP.

For those who don’t read code, I will state in “English” . In increasing levels of verbosity, the levels are:

1. `Error`
2. `Warning`
3. `DryRun`
4. `Information`
5. `Retry`
6. `Verbose`
7. `Profiling`

Meaning, if you use `--log-file-log-level=warning` you get warning AND errors.

`profiling` is the highest and most verbose including all levels below it.

So, `profiling` is more than `verbose`.

As might be expected, `verbose` outputs more than `information`.

`ExplicitOnly` is special and not normally useful.

Interestingly, `DryRun` includes `Errors` and `Warnings` too. Makes sense I guess.

And `Retry` includes everything `DryRun` includes, plus `Informationals`, plus everything at the `Retry` level itself.

But both `verbose` and `profiling` contain both `DryRun` and `Retry` so there might not be much use for those more specific levels.
