Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Odoo scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XCG
Odoo scripts
Commits
046b824d140c
Commit
046b824d140c
authored
6 years ago
by
Vincent Hatakeyama
Browse files
Options
Downloads
Patches
Plain Diff
add options for log levels
parent
7521ce19b344
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
do_tests.py
+29
-4
29 additions, 4 deletions
do_tests.py
docker_dev_start.py
+10
-0
10 additions, 0 deletions
docker_dev_start.py
with
39 additions
and
4 deletions
do_tests.py
+
29
−
4
View file @
046b824d
...
...
@@ -93,6 +93,25 @@
help
=
"
Odoo database password [default: %(default)s]
"
,
default
=
None
,
)
odoo_log_levels
=
[
'
info
'
,
'
warn
'
,
'
debug
'
]
# TODO there are more
parser
.
add_argument
(
'
--log-level
'
,
help
=
"
Override odoo log level (for tests and install)
"
,
default
=
None
,
choices
=
odoo_log_levels
,
)
parser
.
add_argument
(
'
--install-log-level
'
,
help
=
"
Override odoo log level (for install)
"
,
default
=
'
warn
'
,
choices
=
odoo_log_levels
,
)
parser
.
add_argument
(
'
--test-log-level
'
,
help
=
"
Override odoo log level (for test)
"
,
default
=
None
,
choices
=
odoo_log_levels
,
)
# TODO options
# - db host/uri (include socket)
# - db user for creation/remove
...
...
@@ -112,8 +131,12 @@
odoo_db_password
=
nmspc
.
db_password
recreate_db
=
True
extensions
=
[]
install_log_level
=
None
test_log_level
=
None
install_log_level
=
(
nmspc
.
log_level
if
nmspc
.
log_level
else
nmspc
.
install_log_level
)
test_log_level
=
(
nmspc
.
log_level
if
nmspc
.
log_level
else
nmspc
.
test_log_level
)
# Get parameters from setup file
...
...
@@ -211,7 +234,8 @@
install_args
=
list
(
args
)
install_args
.
append
(
'
--install-default
'
)
if
install_log_level
:
install_args
.
append
(
'
--log-level=%s
'
%
install_log_level
)
install_args
.
append
(
'
--log-level
'
)
install_args
.
append
(
install_log_level
)
docker_dev_start
.
main
(
install_args
)
if
result
:
...
...
@@ -223,7 +247,8 @@
test_args
=
list
(
args
)
test_args
.
append
(
'
--test-default
'
)
if
test_log_level
:
install_args
.
append
(
'
--log-level=%s
'
%
test_log_level
)
test_args
.
append
(
'
--log-level
'
)
test_args
.
append
(
test_log_level
)
return
docker_dev_start
.
main
(
test_args
)
else
:
raise
NotImplementedError
...
...
This diff is collapsed.
Click to expand it.
docker_dev_start.py
+
10
−
0
View file @
046b824d
...
...
@@ -230,6 +230,13 @@
action
=
'
store_false
'
,
dest
=
'
dev
'
,
)
odoo_log_levels
=
[
'
info
'
,
'
warn
'
,
'
debug
'
]
# TODO there are more
parser
.
add_argument
(
'
--log-level
'
,
help
=
"
Override odoo log level (for tests and install)
"
,
default
=
None
,
choices
=
odoo_log_levels
,
)
# TODO detect that user is member of docker group
...
...
@@ -358,6 +365,9 @@
arg
.
append
(
'
--without-demo %s
'
%
nmspc
.
database
)
if
nmspc
.
max_cron_threads
:
arg
.
append
(
'
--max-cron-threads=%s
'
%
nmspc
.
max_cron_threads
)
if
nmspc
.
log_level
:
arg
.
append
(
'
--log-level
'
)
arg
.
append
(
nmspc
.
log_level
)
# auto detect local ip
if
use_host_network
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment