Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
L
luna
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
luna
Commits
96527df2
Commit
96527df2
authored
Feb 28, 2017
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update logger
parent
16ab83fe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
8 deletions
+4
-8
app.py
luna/app.py
+1
-1
logger.py
luna/logger.py
+3
-3
websocket.py
luna/views/websocket.py
+0
-4
No files found.
luna/app.py
View file @
96527df2
...
...
@@ -26,7 +26,7 @@ class Luna(Flask):
print
(
time
.
ctime
())
print
(
'Luna version
%
s, more see https://www.jumpserver.org'
%
__version__
)
print
(
'Starting
ssh
server at
%(host)
s:
%(port)
s'
%
print
(
'Starting
web
server at
%(host)
s:
%(port)
s'
%
{
'host'
:
self
.
config
[
'BIND_HOST'
],
'port'
:
self
.
config
[
'LISTEN_PORT'
]})
print
(
'Quit the server with CONTROL-C.'
)
...
...
luna/logger.py
View file @
96527df2
...
...
@@ -22,12 +22,12 @@ LOG_LEVELS = {
}
def
create_logger
(
app
):
def
create_logger
():
level
=
config
.
get
(
'LOG_LEVEL'
,
None
)
level
=
LOG_LEVELS
.
get
(
level
,
logging
.
INFO
)
log_dir
=
config
.
get
(
'LOG_DIR'
,
os
.
path
.
join
(
PROJECT_DIR
,
'logs'
))
log_path
=
os
.
path
.
join
(
log_dir
,
'luna.log'
)
logger_root
=
app
.
logger
logger_root
=
logging
.
getLogger
()
logger
=
logging
.
getLogger
(
config
.
get
(
'NAME'
,
'luna'
))
main_formatter
=
logging
.
Formatter
(
...
...
@@ -48,4 +48,4 @@ def create_logger(app):
def
get_logger
(
name
):
return
logging
.
getLogger
(
'luna.
%
s'
%
name
)
create_logger
(
app
)
create_logger
()
luna/views/websocket.py
View file @
96527df2
# ~*~ coding: utf-8 ~*~
import
select
import
threading
import
collections
import
json
import
logging
import
paramiko
from
flask
import
request
,
g
from
jms.utils
import
to_dotmap
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment