Skip to content

Commit

Permalink
Pass logging a copy of the config to stop editing. Fixes #216
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Sep 1, 2018
1 parent 6a1c160 commit 29541ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mautrix_telegram/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
from typing import Coroutine, List, Optional
from typing import Coroutine, List
import argparse
import asyncio
import logging.config
import sys
import copy

from sqlalchemy import orm
import sqlalchemy as sql
Expand Down Expand Up @@ -66,7 +67,7 @@
print(f"Registration generated and saved to {config.registration_path}")
sys.exit(0)

logging.config.dictConfig(config["logging"])
logging.config.dictConfig(copy.deepcopy(config["logging"]))
log = logging.getLogger("mau.init") # type: logging.Logger
log.debug(f"Initializing mautrix-telegram {__version__}")

Expand Down

0 comments on commit 29541ff

Please sign in to comment.