Skip to content

Mix the formatting of ConsoleLogger with FileLogger #60

Open
@HumpyBlumpy

Description

@HumpyBlumpy

Hello,

I want to output ConsoleLogger to a file. Is it possible?
From the documentation, I first tried using FileLogger. This worked, but outputted too much information (a whole line with the source code location). So next I tried the example from the documentation :

logger = FormatLogger(open("logfile.txt", "w")) do io, args
    println(io, args._module, " | ", "[", args.level, "] ", args.message)
end;

This was better, but not as nice as ConsoleLogger (and was missing some information in some cases).
So basically, I think ConsoleLogger is perfect and I just want to output the same information with the same formatting to a file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions