ID:1727577
 
Not a bug
BYOND Version:507
Operating System:windows 2012
Web Browser:Firefox 31.0
Applies to:Dream Daemon
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
/*
These are simple defaults for your project.
*/


world
fps = 25 // 25 frames per second
icon_size = 32 // 32x32 icon size by default

view = 6 // show up to 6 tiles outward from center (13x13 view)


// Make objects move 8 pixels per tick when walking

mob
step_size = 8

obj
step_size = 8


world/New()
world.log << file("c:\\iamalog.log")
world.log << "ahhh"
world.log << file("c:\\iamalog2.log")
world.log << "ahhhh!"
world << world.log




Setting world.log to a file at runtime on windows doesn't seem to work atleast for the ss13 codebase found here http://github.com/d3athrow/vgstation13 bleeding-edge branch

edit: Added a snippet that you can use, the text lines ahhh and ahhhh! are sent to the world.log but world.log isn't being logged to iamalog.log nor iamalog2.log

Yeah, I just tried this snippet, and it won't save to either of the specified files, even when running on trusted mode. Weird.
Your syntax is off slightly: you need to assign world.log to the new file, not output the file to it.

This seems to be working fine for me:
world/New()
// v needs to be assignment
world.log = file("c:\\iamalog.log")


It also seems to be correct on github:
https://github.com/d3athrow/vgstation13/blob/master/code/ world.dm#L31
Fair enough but it doesn't seem to work with the github code either.
I'm not familiar with the various SS13 codebases, but it looks like it's trying to read from the config object before it's actually initialized:
/world/New()

// ...

// It looks like the config object hasn't been created yet
if(config && config.log_runtimes)
log = file("data/logs/runtime/[time2text(world.realtime,"YYYY-MM-DD-(hh-mm-ss)")]-runtime.log")

// ...

// This call creates the config object
load_configuration()
pff if thats the case then i'm an idiot
the logging session option is better tbh, it keeps the logs also on the dream deamon window, easier to spot errors while testing stuff.
DarkCampainger resolved issue (Not a bug)