frood
October 15, 2018, 1:21pm
#1
I’m using the log to file feature and noticed that Information level logs to not include the name of the backup being run. I have 4 separate backups configured on my server and the only way I can tell which backup is running is by looking at the start time and converting from UTC to local time.
So this is a feature request to include the backup name in the log-file at the beginning of each backup.
Thanks for a great project!
2 Likes
That seems like something that should be to hard for somebody to implement… Just add writing job name (and ID) when the log is created…
ts678
October 22, 2018, 1:46pm
#3
When running without server jobs (e.g. Duplicati.CommandLine.exe), you’d probably need to get more creative.
I would put it here:
where T : ISetCommonOptions, ITaskControl, Logging.ILogDestination
{
m_logTarget = new ControllerMultiLogTarget(result, Logging.LogMessageType.Information, null);
using (Logging.Log.StartScope(m_logTarget, null))
{
m_logTarget.AddTarget(m_messageSink, m_options.ConsoleLoglevel, m_options.ConsoleLogFilter);
result.MessageSink = m_messageSink;
try
{
m_currentTask = result;
m_currentTaskThread = System.Threading.Thread.CurrentThread;
SetupCommonOptions(result, ref paths, ref filter);
Logging.Log.WriteInformationMessage(LOGTAG, "StartingOperation", Strings.Controller.StartingOperationMessage(m_options.MainAction));
using (new ProcessController(m_options))
using (new Logging.Timer(LOGTAG, string.Format("Run{0}", result.MainOperation), string.Format("Running {0}", result.MainOperation)))
using(new CoCoL.IsolatedChannelScope())
using(m_options.ConcurrencyMaxThreads <= 0 ? null : new CoCoL.CappedThreadedThreadPool(m_options.ConcurrencyMaxThreads))
method(result);
The m_options
instance contains the backup name which can be written.
3 Likes