game.log(data [, for_player])

Things that already exist in the current mod API
Post Reply
betrok
Fast Inserter
Fast Inserter
Posts: 101
Joined: Wed Feb 28, 2018 12:08 pm
Contact:

game.log(data [, for_player])

Post by betrok »

I want to add some custom stuff into factorio log.
Sure, it's possible to use write_file, but
  • there will be two separate contexts
  • no way to obtain real timestamp(whole factorio output is redirecting to system journal in my case, so there is current time)
  • file will be reopened every write

Rseding91
Factorio Staff
Factorio Staff
Posts: 13201
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: game.log(data [, for_player])

Post by Rseding91 »

You can already do that with "log(...)"
If you want to get ahold of me I'm almost always on Discord.

betrok
Fast Inserter
Fast Inserter
Posts: 101
Joined: Wed Feb 28, 2018 12:08 pm
Contact:

Re: game.log(data [, for_player])

Post by betrok »

Oh, thanks, that works.
But as far i can see there is no mentions in api documentation.

Post Reply

Return to “Already exists”