LogFly 1.7__tar.gz → 1.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {logfly-1.7/src/logfly.egg-info → logfly-1.8}/PKG-INFO +2 -2
- {logfly-1.7 → logfly-1.8}/README.md +1 -1
- {logfly-1.7 → logfly-1.8}/setup.py +2 -1
- {logfly-1.7 → logfly-1.8}/src/logfly/__init__.py +12 -34
- {logfly-1.7 → logfly-1.8/src/logfly.egg-info}/PKG-INFO +2 -2
- {logfly-1.7 → logfly-1.8}/src/logfly.egg-info/SOURCES.txt +2 -2
- logfly-1.8/src/logfly.egg-info/requires.txt +1 -0
- logfly-1.7/src/logfly/soundfly/__init__.py +0 -7
- {logfly-1.7 → logfly-1.8}/LICENSE +0 -0
- {logfly-1.7 → logfly-1.8}/pyproject.toml +0 -0
- {logfly-1.7 → logfly-1.8}/setup.cfg +0 -0
- {logfly-1.7 → logfly-1.8}/src/logfly.egg-info/dependency_links.txt +0 -0
- {logfly-1.7 → logfly-1.8}/src/logfly.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: logfly
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.8
|
|
4
4
|
Summary: A simple log tool by python
|
|
5
5
|
Home-page: https://about.guki.me
|
|
6
6
|
Author: Yuan Sui
|
|
@@ -15,7 +15,7 @@ Requires-Python: >=3.6
|
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE
|
|
17
17
|
|
|
18
|
-
# logfly 1.
|
|
18
|
+
# logfly 1.8
|
|
19
19
|
### a simple log tool by python
|
|
20
20
|
|
|
21
21
|
## position
|
|
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
|
|
5
5
|
|
|
6
6
|
setuptools.setup(
|
|
7
7
|
name="logfly",
|
|
8
|
-
version="1.
|
|
8
|
+
version="1.8",
|
|
9
9
|
author="Yuan Sui",
|
|
10
10
|
author_email="orisui@icloud.com",
|
|
11
11
|
description="A simple log tool by python",
|
|
@@ -23,4 +23,5 @@ setuptools.setup(
|
|
|
23
23
|
package_dir={"": "src"},
|
|
24
24
|
packages=setuptools.find_packages(where="src"),
|
|
25
25
|
python_requires=">=3.6",
|
|
26
|
+
install_requires=['colorama']
|
|
26
27
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#####################
|
|
2
2
|
# Author: Yuki Sui
|
|
3
|
-
# Date: 2022-1-
|
|
3
|
+
# Date: 2022-1-30
|
|
4
4
|
#####################
|
|
5
5
|
|
|
6
6
|
import time
|
|
@@ -10,7 +10,7 @@ from pathlib import Path
|
|
|
10
10
|
from colorama import init
|
|
11
11
|
|
|
12
12
|
init(autoreset=True)
|
|
13
|
-
__version__ = '1.
|
|
13
|
+
__version__ = '1.8'
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
def create_file(pathfile='', filenname=''):
|
|
@@ -22,7 +22,7 @@ def create_file(pathfile='', filenname=''):
|
|
|
22
22
|
pass
|
|
23
23
|
filepath = pathfile + filenname
|
|
24
24
|
if not os.path.isfile(filepath):
|
|
25
|
-
with open(filepath, 'w') as filefiletemp:
|
|
25
|
+
with open(filepath, 'w', encoding='utf-8') as filefiletemp:
|
|
26
26
|
filefiletemp.write('')
|
|
27
27
|
filefiletemp.close()
|
|
28
28
|
else:
|
|
@@ -103,21 +103,21 @@ def write_log(name, position, level, message, mode='add',
|
|
|
103
103
|
error()
|
|
104
104
|
elif position == 'file':
|
|
105
105
|
if mode == 'add':
|
|
106
|
-
File = open(LOGFILE, 'a', newline='')
|
|
106
|
+
File = open(LOGFILE, 'a', newline='', encoding='utf-8')
|
|
107
107
|
File.write(get_time('datetime') + ' ' + '[' + str.upper(level) + ']' + ' ' + message + '\r\n')
|
|
108
108
|
File.close()
|
|
109
109
|
if hidden == 'yes':
|
|
110
110
|
LOGFILE2 = logfolder_hidden + LOGFILE_hidden
|
|
111
|
-
File = open(LOGFILE2, 'a', newline='')
|
|
111
|
+
File = open(LOGFILE2, 'a', newline='', encoding='utf-8')
|
|
112
112
|
File.write(get_time('datetime') + ' ' + '[' + str.upper(level) + ']' + ' ' + message + '\r\n')
|
|
113
113
|
File.close()
|
|
114
114
|
elif mode == 'new':
|
|
115
|
-
File = open(LOGFILE, 'w', newline='')
|
|
115
|
+
File = open(LOGFILE, 'w', newline='', encoding='utf-8')
|
|
116
116
|
File.write(get_time('datetime') + ' ' + '[' + str.upper(level) + ']' + ' ' + message + '\r\n')
|
|
117
117
|
File.close()
|
|
118
118
|
if hidden == 'yes':
|
|
119
119
|
LOGFILE2 = logfolder_hidden + LOGFILE_hidden
|
|
120
|
-
File = open(LOGFILE2, 'a', newline='')
|
|
120
|
+
File = open(LOGFILE2, 'a', newline='', encoding='utf-8')
|
|
121
121
|
File.write(get_time('datetime') + ' ' + '[' + str.upper(level) + ']' + ' ' + message + '\r\n')
|
|
122
122
|
File.close()
|
|
123
123
|
else:
|
|
@@ -139,21 +139,21 @@ def write_log(name, position, level, message, mode='add',
|
|
|
139
139
|
else:
|
|
140
140
|
error()
|
|
141
141
|
if mode == 'add':
|
|
142
|
-
File = open(LOGFILE, 'a', newline='')
|
|
142
|
+
File = open(LOGFILE, 'a', newline='', encoding='utf-8')
|
|
143
143
|
File.write(get_time('datetime') + ' ' + '[' + str.upper(level) + ']' + ' ' + message + '\r\n')
|
|
144
144
|
File.close()
|
|
145
145
|
if hidden == 'yes':
|
|
146
146
|
LOGFILE2 = logfolder_hidden + LOGFILE_hidden
|
|
147
|
-
File = open(LOGFILE2, 'a', newline='')
|
|
147
|
+
File = open(LOGFILE2, 'a', newline='', encoding='utf-8')
|
|
148
148
|
File.write(get_time('datetime') + ' ' + '[' + str.upper(level) + ']' + ' ' + message + '\r\n')
|
|
149
149
|
File.close()
|
|
150
150
|
elif mode == 'new':
|
|
151
|
-
File = open(LOGFILE, 'w', newline='')
|
|
151
|
+
File = open(LOGFILE, 'w', newline='', encoding='utf-8')
|
|
152
152
|
File.write(get_time('datetime') + ' ' + '[' + str.upper(level) + ']' + ' ' + message + '\r\n')
|
|
153
153
|
File.close()
|
|
154
154
|
if hidden == 'yes':
|
|
155
155
|
LOGFILE2 = logfolder_hidden + LOGFILE_hidden
|
|
156
|
-
File = open(LOGFILE2, 'a', newline='')
|
|
156
|
+
File = open(LOGFILE2, 'a', newline='', encoding='utf-8')
|
|
157
157
|
File.write(get_time('datetime') + ' ' + '[' + str.upper(level) + ']' + ' ' + message + '\r\n')
|
|
158
158
|
File.close()
|
|
159
159
|
else:
|
|
@@ -174,27 +174,5 @@ def error():
|
|
|
174
174
|
write_log('logfly-log', 'CLI', 'error', logflyErrorMessage)
|
|
175
175
|
|
|
176
176
|
|
|
177
|
-
'''
|
|
178
177
|
if __name__ == '__main__':
|
|
179
|
-
|
|
180
|
-
create_file(path, 'test.test')
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
write_log('Doctor Who', 'CLI', 'info', "this is Doctor's log, only in CLI.")
|
|
184
|
-
write_log('Doctor Who', 'CLI', 'warning', "this is Doctor's log, only in CLI.")
|
|
185
|
-
write_log('Doctor Who', 'CLI', 'error', "this is Doctor's log, only in CLI.")
|
|
186
|
-
write_log('Doctor Who', 'fileCLI', 'info', "this is Doctor's log, in file and CLI.", mode='add')
|
|
187
|
-
write_log('Doctor Who', 'file', 'info', "this is Doctor's log, only in file.")
|
|
188
|
-
write_log('Tardis', 'CLI', 'info', "this is Tardis's log, only in CLI.")
|
|
189
|
-
write_log('Tardis', 'fileCLI', 'info', "this is Tardis's log, in file and CLI.")
|
|
190
|
-
write_log('Tardis', 'file', 'info', "this is Tardis's log, only in file.")
|
|
191
|
-
write_log('Death', 'fileCLI', 'info', "this is Death's log, in file and CLI.", mode='add', folder_name='death')
|
|
192
|
-
|
|
193
|
-
write_log('Doctor Who', 'CLI', 'info', "this is Doctor's log, only in CLI.", hidden='yes')
|
|
194
|
-
write_log('Doctor Who', 'fileCLI', 'info', "this is Doctor's log, in file and CLI.", mode='add', hidden='yes')
|
|
195
|
-
write_log('Doctor Who', 'file', 'info', "this is Doctor's log, only in file.", hidden='yes')
|
|
196
|
-
write_log('Tardis', 'CLI', 'info', "this is Tardis's log, only in CLI.", hidden='yes')
|
|
197
|
-
write_log('Tardis', 'fileCLI', 'info', "this is Tardis's log, in file and CLI.", hidden='yes')
|
|
198
|
-
write_log('Tardis', 'file', 'info', "this is Tardis's log, only in file.", hidden='yes')
|
|
199
|
-
write_log('Death', 'fileCLI', 'info', "this is Death's log, in file and CLI.",
|
|
200
|
-
mode='add', folder_name='death', hidden='yes')'''
|
|
178
|
+
write_log('Doctor Who', 'fileCLI', 'info', "this is Doctor's log, only in CLI.")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: logfly
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.8
|
|
4
4
|
Summary: A simple log tool by python
|
|
5
5
|
Home-page: https://about.guki.me
|
|
6
6
|
Author: Yuan Sui
|
|
@@ -15,7 +15,7 @@ Requires-Python: >=3.6
|
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE
|
|
17
17
|
|
|
18
|
-
# logfly 1.
|
|
18
|
+
# logfly 1.8
|
|
19
19
|
### a simple log tool by python
|
|
20
20
|
|
|
21
21
|
## position
|
|
@@ -6,5 +6,5 @@ src/logfly/__init__.py
|
|
|
6
6
|
src/logfly.egg-info/PKG-INFO
|
|
7
7
|
src/logfly.egg-info/SOURCES.txt
|
|
8
8
|
src/logfly.egg-info/dependency_links.txt
|
|
9
|
-
src/logfly.egg-info/
|
|
10
|
-
src/logfly/
|
|
9
|
+
src/logfly.egg-info/requires.txt
|
|
10
|
+
src/logfly.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
colorama
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|