diff --git a/cpl-workspace.json b/cpl-workspace.json index cf21a2c..70c1214 100644 --- a/cpl-workspace.json +++ b/cpl-workspace.json @@ -5,7 +5,6 @@ "gismo": "src/gismo/gismo.json", "gismo-cli": "src/gismo_cli/gismo-cli.json", "gismo-core": "src/gismo_core/gismo-core.json", - "modules_core": "src/modules_core/modules_core.json", "boot-log": "src/modules/boot_log/boot-log.json" }, "Scripts": {} diff --git a/src/modules/boot_log/__init__.py b/src/modules/boot_log/__init__.py new file mode 100644 index 0000000..ad5eca3 --- /dev/null +++ b/src/modules/boot_log/__init__.py @@ -0,0 +1 @@ +# imports: diff --git a/src/modules/boot_log/appsettings.json b/src/modules/boot_log/appsettings.json new file mode 100644 index 0000000..629e6eb --- /dev/null +++ b/src/modules/boot_log/appsettings.json @@ -0,0 +1,15 @@ +{ + "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" + } +} diff --git a/src/modules/boot_log/boot-log.json b/src/modules/boot_log/boot-log.json new file mode 100644 index 0000000..32aa09c --- /dev/null +++ b/src/modules/boot_log/boot-log.json @@ -0,0 +1,43 @@ +{ + "ProjectSettings": { + "Name": "modules/boot-log", + "Version": { + "Major": "0", + "Minor": "0", + "Micro": "0" + }, + "Author": "", + "AuthorEmail": "", + "Description": "", + "LongDescription": "", + "URL": "", + "CopyrightDate": "", + "CopyrightName": "", + "LicenseName": "", + "LicenseDescription": "", + "Dependencies": [ + "sh_cpl>=2021.10.2" + ], + "PythonVersion": ">=3.9.2", + "PythonPath": { + "linux": "" + }, + "Classifiers": [] + }, + "BuildSettings": { + "ProjectType": "library", + "SourcePath": "", + "OutputPath": "../../dist", + "Main": "modules/_boot_log.main", + "EntryPoint": "modules/boot-log", + "IncludePackageData": false, + "Included": [], + "Excluded": [ + "*/__pycache__", + "*/logs", + "*/tests" + ], + "PackageData": {}, + "ProjectReferences": [] + } +} \ No newline at end of file diff --git a/src/modules/boot_log/main.py b/src/modules/boot_log/main.py new file mode 100644 index 0000000..f716961 --- /dev/null +++ b/src/modules/boot_log/main.py @@ -0,0 +1,23 @@ +from cpl_core.configuration import Configuration, ConfigurationABC +from cpl_core.console import Console +from cpl_core.dependency_injection import ServiceCollection, ServiceProviderABC + + +def configure_configuration() -> ConfigurationABC: + config = Configuration() + return config + + +def configure_services(config: ConfigurationABC) -> ServiceProviderABC: + services = ServiceCollection(config) + return services.build_service_provider() + + +def main(): + config = configure_configuration() + provider = configure_services(config) + Console.write_line('Hello World') + + +if __name__ == '__main__': + main()