def append_log():
     log_file_path = os.path.join(sublime.packages_path(), 'User',
         'SFTP.errors.log')
     send_log_path = log_file_path
     timestamp = sftp_times.timestamp_to_string(time.time(),
             '%Y-%m-%d %H:%M:%S\n')
     with open(log_file_path, 'a') as f:
         f.write(timestamp)
         f.write(message)
     if sftp_debug.get_debug() and sftp_debug.get_debug_log_file():
         send_log_path = sftp_debug.get_debug_log_file()
         sftp_debug.debug_print(message)
     sublime.error_message(('Sublime SFTP\n\nAn unexpected error ' +
         'occurred, please send the file %s to [email protected]') % (
         send_log_path))
     sublime.active_window().run_command('open_file',
         {'file': sftp_paths.fix_windows_path(send_log_path)})
Esempio n. 2
0
 def append_log():
     log_file_path = os.path.join(sublime.packages_path(), 'User',
         'SFTP.errors.log')
     send_log_path = log_file_path
     timestamp = sftp_times.timestamp_to_string(time.time(),
             '%Y-%m-%d %H:%M:%S\n')
     with open(log_file_path, 'a') as f:
         f.write(timestamp)
         f.write(message)
     if sftp_debug.get_debug() and sftp_debug.get_debug_log_file():
         send_log_path = sftp_debug.get_debug_log_file()
         sftp_debug.debug_print(message)
     sublime.error_message(('Sublime SFTP\n\nAn unexpected error ' +
         'occurred, please send the file %s to [email protected]') % (
         send_log_path))
     sublime.active_window().run_command('open_file',
         {'file': sftp_paths.fix_windows_path(send_log_path)})
Esempio n. 3
0
 def append_log():
     log_file_path = os.path.join(sublime.packages_path(), 'User',
                                  'SFTP.errors.log')
     send_log_path = log_file_path
     timestamp = sftp_times.timestamp_to_string(time.time(),
                                                '%Y-%m-%d %H:%M:%S\n')
     with open(log_file_path, 'a') as f:
         f.write(timestamp)
         f.write(message)
     if sftp_debug.get_debug() and sftp_debug.get_debug_log_file():
         send_log_path = sftp_debug.get_debug_log_file()
         sftp_debug.debug_print(message)
     sublime.error_message(
         'SFTP\n\nAn unexpected error occurred, please submit '
         'the file %s with a Request at https://codexns.io/account' %
         send_log_path)
     sublime.active_window().run_command(
         'open_file',
         {'file': sftp_paths.fix_windows_path(send_log_path)})