Commit 70eac85 1 parent 1705324 commit 70eac85 Copy full SHA for 70eac85
File tree 2 files changed +11
-2
lines changed
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ To run the actions from your yaml template file run:
36
36
37
37
` joft run --template ./<path to your yaml template> `
38
38
39
+ If you need more verbose output for debugging, define ` JOFT_DEBUG=1 ` environment variable.
40
+
39
41
## Docs
40
42
41
43
Documentation can be found [ here] ( docs/introduction.md ) .
Original file line number Diff line number Diff line change 1
1
import logging
2
+ import os
2
3
import sys
3
4
4
5
import click
8
9
import joft .utils
9
10
10
11
12
+ if os .getenv ("JOFT_DEBUG" ):
13
+ logging_level = logging .DEBUG
14
+ else :
15
+ logging_level = logging .WARNING
16
+
17
+
11
18
@click .group ()
12
19
@click .pass_context
13
20
def main (ctx ) -> None :
@@ -26,7 +33,7 @@ def validate(template) -> int:
26
33
@click .option ("--template" , help = "File path to the template file." )
27
34
@click .pass_obj
28
35
def run (ctx , template : str ) -> int :
29
- logging .basicConfig (format = "%(levelname)s:%(message)s" , level = logging . DEBUG )
36
+ logging .basicConfig (format = "%(levelname)s:%(message)s" , level = logging_level )
30
37
logging .info (
31
38
f"Establishing session with jira server: { ctx ['jira' ]['server' ]['hostname' ]} :"
32
39
)
@@ -47,7 +54,7 @@ def run(ctx, template: str) -> int:
47
54
@click .option ("--template" , help = "File path to the template file." )
48
55
@click .pass_obj
49
56
def list_issues (ctx , template : str ) -> None :
50
- logging .basicConfig (format = "%(levelname)s:%(message)s" , level = logging . DEBUG )
57
+ logging .basicConfig (format = "%(levelname)s:%(message)s" , level = logging_level )
51
58
logging .info (
52
59
f"Establishing session with jira server: { ctx ['jira' ]['server' ]['hostname' ]} :"
53
60
)
You can’t perform that action at this time.
0 commit comments