Akkling icon indicating copy to clipboard operation
Akkling copied to clipboard

Actor name does not appear in logs

Open vasily-kirichenko opened this issue 6 years ago • 1 comments

module ServerList

let props =
    props(
        let rec loop (ctx: Actor<Msg>) = function
            | Tick ->
                    logInfo ctx "Getting server list..."
...

It's spawned by another actor:

let props () : Props =
        Props.props(
            ...
            
            fun (ctx: Actor<obj>) ->
                spawn ctx "server-list" ServerList.props |> ignore
                ...
        ).ToProps()

After that I expect that the logs should contain "server-list" as an appender name, but they don't:

12:18:43 INFO  [0, Culture=neutral, PublicKeyToken=null]], 19] Getting server list... 

It make reading logs very hard.

vasily-kirichenko avatar Feb 16 '18 09:02 vasily-kirichenko

@vasily-kirichenko Try updating to latest Akka.Logger.NLog 1.3.1: https://www.nuget.org/packages/Akka.Logger.NLog/

It should improve the logger-names for NLog. Alternative use ${event-properties:item=logSource:whenEmpty=${logger}} instead of just ${logger}.

snakefoot avatar May 17 '18 18:05 snakefoot