1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 00:07:14 +03:00

Document error log file.

This commit is contained in:
Jonathan Harris 2017-05-02 00:42:25 +01:00
parent 6a04e67451
commit cf2aaed37d
2 changed files with 4 additions and 1 deletions

View File

@ -28,13 +28,14 @@ if __debug__:
import signal
signal.signal(signal.SIGTERM, lambda sig, frame: pdb.Pdb().set_trace(frame))
from config import appname, applongname, config
from config import appname, applongname, appversion, config
if getattr(sys, 'frozen', False):
if platform == 'win32':
chdir(dirname(sys.path[0]))
# By default py2exe tries to write log to dirname(sys.executable) which fails when installed
import tempfile
sys.stdout = sys.stderr = open(join(tempfile.gettempdir(), '%s.log' % appname), 'wt', 0) # unbuffered
print '%s %s %s' % (applongname, appversion, strftime('%Y-%m-%dT%H:%M:%S', localtime()))
from l10n import Translations
Translations().install(config.get('language') or None)

View File

@ -30,6 +30,8 @@ def plugin_start():
return "Test"
```
Any errors or print statements from your plugin will appear in `%TMP%\EDMarketConnector.log` on Windows or `$TMPDIR\EDMarketConnector.log` on Mac.
# Plugin Hooks
## Configuration