@@ -1273,7 +1273,7 class Project(Process): | |||||
1273 |
|
1273 | |||
1274 | def run(self): |
|
1274 | def run(self): | |
1275 |
|
1275 | |||
1276 | log.success('Starting {}'.format(self.name)) |
|
1276 | log.success('Starting {}'.format(self.name), tag='') | |
1277 | self.start_time = time.time() |
|
1277 | self.start_time = time.time() | |
1278 | self.createObjects() |
|
1278 | self.createObjects() | |
1279 | self.connectObjects() |
|
1279 | self.connectObjects() |
@@ -18,23 +18,35 SCHAINPY - LOG | |||||
18 | import click |
|
18 | import click | |
19 |
|
19 | |||
20 |
|
20 | |||
21 | def warning(message, tag='Warning'): |
|
21 | def warning(message, tag='Warning', nl=True): | |
22 | click.echo(click.style('[{}] {}'.format(tag, message), fg='yellow')) |
|
22 | if tag: | |
|
23 | click.echo(click.style('[{}] {}'.format(tag, message), fg='yellow'), nl=nl) | |||
|
24 | else: | |||
|
25 | click.echo(click.style('{}'.format(message), fg='yellow'), nl=nl) | |||
23 | pass |
|
26 | pass | |
24 |
|
27 | |||
25 |
|
28 | |||
26 | def error(message, tag='Error'): |
|
29 | def error(message, tag='Error', nl=True): | |
27 | click.echo(click.style('[{}] {}'.format(tag, message), fg='red')) |
|
30 | if tag: | |
|
31 | click.echo(click.style('[{}] {}'.format(tag, message), fg='red'), nl=nl) | |||
|
32 | else: | |||
|
33 | click.echo(click.style('{}'.format(message), fg='red'), nl=nl) | |||
28 | pass |
|
34 | pass | |
29 |
|
35 | |||
30 |
|
36 | |||
31 |
def success(message, tag=' |
|
37 | def success(message, tag='Success', nl=True): | |
32 | click.echo(click.style('[{}] {}'.format(tag, message), fg='green')) |
|
38 | if tag: | |
|
39 | click.echo(click.style('[{}] {}'.format(tag, message), fg='green'), nl=nl) | |||
|
40 | else: | |||
|
41 | click.echo(click.style('{}'.format(message), fg='green'), nl=nl) | |||
33 | pass |
|
42 | pass | |
34 |
|
43 | |||
35 |
|
44 | |||
36 | def log(message, tag='Info'): |
|
45 | def log(message, tag='Info', nl=True): | |
37 | click.echo('[{}] {}'.format(tag, message)) |
|
46 | if tag: | |
|
47 | click.echo('[{}] {}'.format(tag, message), nl=nl) | |||
|
48 | else: | |||
|
49 | click.echo('{}'.format(message), nl=nl) | |||
38 | pass |
|
50 | pass | |
39 |
|
51 | |||
40 |
|
52 |
General Comments 0
You need to be logged in to leave comments.
Login now