If you're editing vanilla's medieval2.preference.cfg, make sure the file is not read-only. I recommend that you set up a .cfg file for your mod instead of editing the vanilla config file as you will have fewer issues and of course any other users of your mod (if you publish) will not want to replace their vanilla config file. A mod's .cfg file does not need anything in it, if you only include the [log] section above, it will pull all the other configs from medieval2.preference.cfg. Your entire .cfg file could be this:
Code:
[features]
mod = mods/your_mod_folder_name
[log]
to = mods/your_mod_folder_name/logs/log_file_name.system.log.txt
level = *script* trace
Also a note: if you do publish your mod, you may want to use the * error log instead of script trace as it's somewhat better for performance.