Custom log message format in tyk api gateway logs

Hi, We are running the tyk gateway docker image on aws cloud. Would it be possible to customize the logger output message format without much changes? May be by including some property entry in configuration file?

Kishor Kumar

Tyk logger by default supports Stdout, Logstash, Sentry, Syslog, Graylog and raw Redis loggers.
So maybe instead of changing logger format, it will be useful to use one of those outputs instead.


Thank you very much immediate reply. You must be suggesting us to use tyk pump configuration options, that is very good option to pursue in log term is what we feel here. If we want to change log entry to comply with our org standards or for some other reason is there any easy way we can alter the out put format. This is a general use case where any logging framework would provide using format string or reg ex. As of now I am only concerned about log file that is created on file system but not to transport it to somewhere else. Simple tweak would be really helpful in this case for us.

Actually, I was talking about Gateway logger options, see docs Log Data

It also depends on what kind of logging you want.

If you talking about internal Gateway logs, one of this loggers should fit your needs, if not you can always try a fork.

Regarding Pump, if you need to log user requests, it indeed can be extended with various pumps, to send data to whatever data source you want. For example in addition to default Mongo it can send data to ElasticSearch or similar.