Remove frozen logging on windows

Because of the new build process this has become obsolete
we can now log on windows with a simple

´Gajim.exe > log.txt 2>&1´
This commit is contained in:
Philipp Hörist 2017-05-17 15:57:23 +02:00
parent 148655c59f
commit a73f02735a
1 changed files with 0 additions and 35 deletions

View File

@ -130,9 +130,6 @@ class GajimApplication(Gtk.Application):
configpaths.gajimpaths.init(
self.config_path, self.profile, self.profile_separation)
if hasattr(sys, 'frozen'):
self.frozen_logging(configpaths.gajimpaths.config_root)
from common import gajim
from common import check_paths
from common import exceptions
@ -311,38 +308,6 @@ class GajimApplication(Gtk.Application):
warnings.showwarning = warn_with_traceback
warnings.filterwarnings(action="always")
def frozen_logging(self, path):
import warnings
if not os.path.exists(path):
os.mkdir(path, 0o700)
class MyStd(object):
_file = None
_error = None
log_file = os.path.join(path, 'gajim.log')
def write(self, text):
if self._file is None and self._error is None:
try:
self._file = open(self.log_file, 'a')
except Exception as details:
self._error = details
if self._file is not None:
self._file.write(text)
self._file.flush()
def flush(self):
if self._file is not None:
self._file.flush()
def isatty(self):
return False
outerr = MyStd()
sys.stdout = outerr
sys.stderr = outerr
warnings.filterwarnings(action='ignore')
def add_actions(self):
''' Build Application Actions '''
from app_actions import AppActions