Identify application in seq

34 views
Skip to first unread message

Sebastien Auroux

unread,
Sep 26, 2014, 6:01:37 AM9/26/14
to get...@googlegroups.com
Hello

I configure all my applications to log on the same instance of Seq server. is there a way to have the application which logs in seq so we can sort logs.
thanks
sebastien

nblum...@nblumhardt.com

unread,
Sep 26, 2014, 8:31:05 PM9/26/14
to get...@googlegroups.com
Hi Sebastien,

There are two ways to do this.

1. via Serilog

If you're writing events with Serilog, you can enrich each event sent by the application with an appropriate property:

  Log.Logger = new LoggerConfiguration()
    .Enrich.WithProperty("ApplicationName", appName)
    ....

2. via API keys

Alternatively, if you have each application that connects to Seq use a unique API key, you can associate a property like "ApplicationName" with each key; go to Settings > API keys to see how this is done.

If you need more help with either method please let me know.

Best regards,
Nick

Sebastien Auroux

unread,
Sep 30, 2014, 5:24:29 AM9/30/14
to get...@googlegroups.com
thank you
exactly what i needed

Sebastien Auroux

unread,
Oct 1, 2014, 6:24:08 AM10/1/14
to get...@googlegroups.com
Hello,

I have different environment where i push each of my application. I am trying to have the configuration setting as consistent as possible. It would be nice to have the same token for a given application deployed in several environment. is there a way to force the token ?

Regards,
Sebastien

nblum...@nblumhardt.com

unread,
Oct 2, 2014, 7:17:01 AM10/2/14
to get...@googlegroups.com
Hi Sebastien!

I'm not certain what you mean by "force the token" - can you please clarify with an example?

Many thanks,
Nick

Sebastien Auroux

unread,
Oct 2, 2014, 9:59:20 AM10/2/14
to get...@googlegroups.com
i meant : set a specific token to the application.

i deploy an applciation "app1" in my integration environment, i configure it to use an api key generated by seq installed in my integration environmenet. 
I need to deploy the same application in production environment, i configure it to use an api key generated by seq installed in my production envrionment. 

I chose to have two differents seq server in production and integration. For integration, the api key generated is not the same as the api key generated in production. 
So i need to configure differently my "app1" between integration and production environment. 

nblum...@nblumhardt.com

unread,
Oct 2, 2014, 4:11:44 PM10/2/14
to get...@googlegroups.com
Aha - understood. No, it's not possible currently to export/import API keys or set specific tokens; separate configuration is required.

Regards,
Nick
Reply all
Reply to author
Forward
0 new messages