[WIP] Improved cpl new templating #139
This commit is contained in:
29
src/cpl_cli/.cpl/project_file_appsettings.py
Normal file
29
src/cpl_cli/.cpl/project_file_appsettings.py
Normal file
@@ -0,0 +1,29 @@
|
||||
import textwrap
|
||||
|
||||
from cpl_cli.abc.file_template_abc import FileTemplateABC
|
||||
|
||||
|
||||
class ProjectFileAppsettings(FileTemplateABC):
|
||||
|
||||
def __init__(self, path: str):
|
||||
code = textwrap.dedent("""\
|
||||
{
|
||||
"TimeFormatSettings": {
|
||||
"DateFormat": "%Y-%m-%d",
|
||||
"TimeFormat": "%H:%M:%S",
|
||||
"DateTimeFormat": "%Y-%m-%d %H:%M:%S.%f",
|
||||
"DateTimeLogFormat": "%Y-%m-%d_%H-%M-%S"
|
||||
},
|
||||
|
||||
"LoggingSettings": {
|
||||
"Path": "logs/",
|
||||
"Filename": "log_$start_time.log",
|
||||
"ConsoleLogLevel": "ERROR",
|
||||
"FileLogLevel": "WARN"
|
||||
}
|
||||
}
|
||||
""")
|
||||
FileTemplateABC.__init__(self, 'appsettings.json', path, code)
|
||||
|
||||
def get_code(self) -> str:
|
||||
return self._code
|
||||
Reference in New Issue
Block a user