Skip to content

Commit

Permalink
logger: setup logging lib and use it in main script
Browse files Browse the repository at this point in the history
This commit adds a logging library to the project and uses it in the main
script. The logging library is configured to log to the console and to a
file. The log level is set to INFO.

Issue: none
  • Loading branch information
pmpbaptista committed Jun 21, 2024
1 parent 41af4eb commit d374a29
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,28 @@ This is a guide to help you get started with the project. It will walk you throu

Before you begin, ensure you have met the following requirements:

## Configuration

To set up the project, follow these steps:

1. Step 1
2. Step 2
3. Step 3

### Environment Variables

The project uses environment variables to configure the application. You can set these variables in a `.env` file in the root of the project.

```sh
# .env
FR_VERBOSE=true
```


## Running the project

To run the project, follow these steps:

1. Step 1
2. Step 2
3. Step 3
7 changes: 7 additions & 0 deletions folder_replicator/__main__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
""" Main module for the folder-replicator package. """

from folder_replicator.lib import logger as fr_logger
from folder_replicator.SyncContext import SyncContext
from folder_replicator.SyncStrategyLocal import SyncStrategyLocal



# Get the logger
logger = fr_logger.get_logger()

def main():
"""
Main function for the folder-replicator package.
Expand All @@ -15,6 +20,8 @@ def main():

print("Hello, world!")

logger.info("Hello, world!")

# The client code picks a concrete strategy and passes it to the context.
# The client should be aware of the differences between strategies in order
# to make the right choice.
Expand Down

0 comments on commit d374a29

Please sign in to comment.