log() - possible to remove script name?

Place to get help with not working mods / modding interface.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

log() - possible to remove script name?

Post by aubergine18 »

If I log something from a script, it includes the script name and line number, like this:

Code: Select all

1.695 Script shortcut.lua:27: Shortcut "SHIFT + E" triggers "earthquake" (none)*
Is there any way I can remove the 'Script shortcut.lua:27:' from the start of that log line?
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Rseding91
Factorio Staff
Factorio Staff
Posts: 15985
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: log() - possible to remove script name?

Post by Rseding91 »

Not currently. Why would you want to?
If you want to get ahold of me I'm almost always on Discord.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: log() - possible to remove script name?

Post by aubergine18 »

It was just to make the log output of script look a little more refined, so nothing vital.

I was going to say it would be useful to serpent dump data.raw to the logs to help with debugging data.lua and data-final-fixes.lua scripts, but for that sort of stuff it might be better having something like a data.write_file() (same as script.write_file() but available when data is being defined).
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Post Reply

Return to “Modding help”