Detected modification of the global 'log' function."

Bugs that are actually features.
Ratzap
Filter Inserter
Filter Inserter
Posts: 371
Joined: Sun Aug 16, 2015 11:15 pm
Contact:

Detected modification of the global 'log' function."

Post by Ratzap »

I upgraded my server to 0.14.8 and it no longer starts up. The message below gets put into the log. I deleted the first mod it spat that out for and tried again but it just does it on the next one instead.

Code: Select all

Detected modification of the global 'log' function."
  27.561 Info ServerMultiplayerManager.cpp:637: mapTick(-1) changing state from(CreatingGame) to(InitializationFailed)
  27.561 Error Main.cpp:457: Couldn't load the game for MP: Error while processing 'mod-CORE-DyTech-Core' control.lua.

Detected modification of the global 'log' function.
Ratzap
Filter Inserter
Filter Inserter
Posts: 371
Joined: Sun Aug 16, 2015 11:15 pm
Contact:

Re: Detected modification of the global 'log' function."

Post by Ratzap »

I rolled it back to 0.14.7 and the same mods all load fine - game starts and I get in.
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: Detected modification of the global 'log' function."

Post by Nexela »

Ohh fancy new protection

you have a mod which overwrites the log function :)
Last edited by Nexela on Tue Sep 20, 2016 8:43 pm, edited 1 time in total.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14359
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Detected modification of the global 'log' function."

Post by Rseding91 »

Remove the mod "dytech core" until he fixes his broken mod.
If you want to get ahold of me I'm almost always on Discord.
Ratzap
Filter Inserter
Filter Inserter
Posts: 371
Joined: Sun Aug 16, 2015 11:15 pm
Contact:

Re: Detected modification of the global 'log' function."

Post by Ratzap »

Rseding91 wrote:Remove the mod "dytech core" until he fixes his broken mod.
Unfortunately not an option with 60 hours on this map. I'll bring it up in his thread though for sure.

It wasn't just Dytech either so I imagine a few authors will have to change their stuff.
devilwarriors
Filter Inserter
Filter Inserter
Posts: 311
Joined: Sat Jan 09, 2016 1:11 am
Contact:

Re: Detected modification of the global 'log' function."

Post by devilwarriors »

Just search "log" in their code and delete whatever function you find.. it's probably just a shortcut to log stuff to the console like I did.
devilwarriors
Filter Inserter
Filter Inserter
Posts: 311
Joined: Sat Jan 09, 2016 1:11 am
Contact:

Re: Detected modification of the global 'log' function."

Post by devilwarriors »

and what is this function for? there is not a single mention of a global function named log in the documentation..
Ah found what it does.
Would be nice if that was documented, it could be usefull to people..
Like I could draw dicks in the logs file and nobody would ever know it was me since the mod name is not indicated mouhahahaha
Rseding91
Factorio Staff
Factorio Staff
Posts: 14359
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Detected modification of the global 'log' function."

Post by Rseding91 »

devilwarriors wrote:and what is this function for? there is not a single mention of a global function named log in the documentation..
Ah found what it does.
Would be nice if that was documented, it could be usefull to people..
Like I could draw dicks in the logs file and nobody would ever know it was me since the mod name is not indicated mouhahahaha
It does what the name suggests: it writes to the log file.
If you want to get ahold of me I'm almost always on Discord.
British_Petroleum
Filter Inserter
Filter Inserter
Posts: 321
Joined: Tue Dec 23, 2014 7:21 am
Contact:

Re: Detected modification of the global 'log' function."

Post by British_Petroleum »

I deleted control.lua from all the dytech mods and it works now. No issues yet. I looked through the code briefly and it appears to be all debugging stuff.
kasandraen
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Wed May 27, 2015 11:00 pm
Contact:

Re: Detected modification of the global 'log' function."

Post by kasandraen »

Rseding91 wrote:
devilwarriors wrote:and what is this function for? there is not a single mention of a global function named log in the documentation..
Ah found what it does.
Would be nice if that was documented, it could be usefull to people..
Like I could draw dicks in the logs file and nobody would ever know it was me since the mod name is not indicated mouhahahaha
It does what the name suggests: it writes to the log file.
May I ask why you removed the possibility to write to the log file?
I'll have to remove it from my releases of dytech no (not really an issues since I dont use the log eitherway) I'd just like to know?
Did you revceve a bunch of error reports with log full of shit since you decided to remove it?
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5290
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Detected modification of the global 'log' function."

Post by Klonan »

kasandraen wrote:
Rseding91 wrote:
devilwarriors wrote:and what is this function for? there is not a single mention of a global function named log in the documentation..
Ah found what it does.
Would be nice if that was documented, it could be usefull to people..
Like I could draw dicks in the logs file and nobody would ever know it was me since the mod name is not indicated mouhahahaha
It does what the name suggests: it writes to the log file.
May I ask why you removed the possibility to write to the log file?
I'll have to remove it from my releases of dytech no (not really an issues since I dont use the log eitherway) I'd just like to know?
Did you revceve a bunch of error reports with log full of shit since you decided to remove it?
The ability to write to the log is still there,

The issue is overwriting the log function, like:

Code: Select all

function log()
   game.print("this is my own silly log function which overwrites the base game log function which isn't allowed anymore")
end
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: Detected modification of the global 'log' function."

Post by Nexela »

Dytech (and some other mods) were overwriting the built in log() function. Since all mods are in the same environment in the data stage this caused issues for other mods that used log()

The only change made here was that now it is no longer possible to overwrite the function. It is still available for use.
kasandraen
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Wed May 27, 2015 11:00 pm
Contact:

Re: Detected modification of the global 'log' function."

Post by kasandraen »

Klonan wrote:
kasandraen wrote:
Rseding91 wrote:
devilwarriors wrote:and what is this function for? there is not a single mention of a global function named log in the documentation..
Ah found what it does.
Would be nice if that was documented, it could be usefull to people..
Like I could draw dicks in the logs file and nobody would ever know it was me since the mod name is not indicated mouhahahaha
It does what the name suggests: it writes to the log file.
May I ask why you removed the possibility to write to the log file?
I'll have to remove it from my releases of dytech no (not really an issues since I dont use the log eitherway) I'd just like to know?
Did you revceve a bunch of error reports with log full of shit since you decided to remove it?
The ability to write to the log is still there,

The issue is overwriting the log function, like:

Code: Select all

function log()
   game.print("this is my own silly log function which overwrites the base game log function which isn't allowed anymore")
end
Okay, I just removed it entirely. I'm not good enough with lua to bother with fixing it, as I dont use the logs eitherway(or rather know how).
Post Reply

Return to “Not a bug”