Metadata-Version: 2.1
Name: m-formatter-logging
Version: 1.0.0
Summary: MobioLogging
Home-page: UNKNOWN
Author: MOBIO
Author-email: contact@mobio.io
License: UNKNOWN
Platform: UNKNOWN
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# m-formatter-logging là thư viện python để write log cho các module BackEnd-Mobio

#### Version:
Phiên bản hiện tại `1.0.0`

#### Cài đặt:
`pip3 install m-formatter-logging`

#### Sử dụng:
1. Example:

```
if __name__ == '__main__':
    def test():
        MobioLogging().info('app_test_lib_logging::test():info', sensitive=True, extra={"key1": "value1"})
        try:
            a = 1 / 0
            MobioLogging().info('__init__::test():a: %s' % a)
        except Exception as ex1:
            MobioLogging().error('app_test_lib_logging::test():error: %s' % ex1, sensitive=True)

        MobioLogging().debug('app_test_lib_logging::test():debug')
        MobioLogging().warning('app_test_lib_logging::test():warning', sensitive=False)

    test()
```


2. Sử dụng file custom config:
```
config_file_path = 'path/to/config/file'
MobioLogging().file_config(self, config_file_path)
```


3. Sử dụng custom filter:
```
class CustomizeFilterRecords():
    def filter(self, record):
        if record.key1 == 'value1':
            return False # no log
        return True

MobioLogging().logger.addFilter(CustomizeFilterRecords())
```

