1
Fork 0
mirror of https://github.com/wlinator/luminara.git synced 2024-10-02 18:03:12 +00:00

Rename to Lumi

This commit is contained in:
wlinator 2024-06-16 00:45:24 +02:00
parent 962b4b0abd
commit 2d1490c0ae
39 changed files with 88 additions and 88 deletions

View file

@ -12,4 +12,4 @@ DBX_APP_SECRET=
MARIADB_USER=wlinator
MARIADB_PASSWORD=
MARIADB_ROOT_PASSWORD=
MARIADB_DATABASE=racudb
MARIADB_DATABASE=lumidb

View file

@ -16,4 +16,4 @@ COPY . .
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
CMD [ "python", "./Racu.py" ]
CMD [ "python", "./Lumi.py" ]

View file

@ -16,12 +16,12 @@ async def get_prefix(bot, message):
except AttributeError:
return "."
client = services.Client.RacuBot(
client = services.Client.LumiBot(
owner_id=int(os.environ.get('RACU_OWNER_ID')),
command_prefix=get_prefix,
intents=discord.Intents.all(),
status=discord.Status.online,
help_command=services.Help.RacuHelp()
help_command=services.Help.LumiHelp()
)
@ -52,7 +52,7 @@ def load_modules():
if __name__ == '__main__':
"""
This code is only ran when Racu.py is the primary module,
This code is only ran when Lumi.py is the primary module,
so NOT when main is imported from a cog. (sys.modules)
"""

View file

@ -1,19 +1,19 @@
# You can invite me with [this link](https://discord.com/oauth2/authorize?client_id=1038050427272429588&permissions=8&scope=bot). Thanks for using Racu!
# You can invite me with [this link](https://discord.com/oauth2/authorize?client_id=1038050427272429588&permissions=8&scope=bot). Thanks for using Lumi!
![Racu art](https://git.wlinator.org/assets/img/logo.png)
![Lumi art](https://git.wlinator.org/assets/img/logo.png)
## Self-host
**The next part of this README explains how to self-host Racu, this allows you to host your own version of my code and
**The next part of this README explains how to self-host Lumi, this allows you to host your own version of my code and
create a personalized Discord bot.**
**Note: because the `.slots` and `.blackjack` commands use custom (animated) emoji, these commands will break when you self-host Racu. Please replace the ID values in `config/JSON/resources.json` with your own set of emotes.**
**Note: because the `.slots` and `.blackjack` commands use custom (animated) emoji, these commands will break when you self-host Lumi. Please replace the ID values in `config/JSON/resources.json` with your own set of emotes.**
### Installation
#### Docker
Racu comes containerized with essential components such as MariaDB, its core application, Adminer, and Dozzle. To ensure smooth operation of Dozzle, it's necessary to copy `users.yml.example` to `users.yml` and configure an authentication user as outlined in the file. Refer to the file for detailed instructions.
Lumi comes containerized with essential components such as MariaDB, its core application, Adminer, and Dozzle. To ensure smooth operation of Dozzle, it's necessary to copy `users.yml.example` to `users.yml` and configure an authentication user as outlined in the file. Refer to the file for detailed instructions.
To install Racu, run these commands:
To install Lumi, run these commands:
```commandline
git clone https://gitlab.com/wlinator/racu && cd racu
@ -30,7 +30,7 @@ Please note that it's highly recommended to establish a reverse proxy setup for
- Dozzle should be mapped to port 8081.
#### Alternative
You can run Racu without Docker, however I don't provide support or documentation for this. Here are some requirements to get you started.
You can run Lumi without Docker, however I don't provide support or documentation for this. Here are some requirements to get you started.
- MariaDB server on port 3306.
- Python 3.11 with the [required pip packages](requirements.txt).
@ -50,4 +50,4 @@ Other variables can be specified in `docker.compose.yml` (core)
---
Some icons used in Racu are provided by [Icons8](https://icons8.com/).
Some icons used in Lumi are provided by [Icons8](https://icons8.com/).

View file

@ -29,7 +29,7 @@
"You've achieved **Level {}**. Achievement unlocked: Professional Procrastinator.",
"You're at **Level {}**. Do you also level up in avoiding responsibilities?",
"You've reached **Level {}**. If only leveling up in real life was this easy, huh?",
"You're now **Level {}**. If only your productivity levels matched your Racu level."
"You're now **Level {}**. If only your productivity levels matched your Lumi level."
],
"11-20": [
"Congratulations motherfucker you leveled the fuck up to **Level {}**.",

View file

@ -1,8 +1,8 @@
{
"full_content_reactions": {
"good bot": "thanks :3",
"fuck you racu": "Dont threaten me with a good time.",
"racu fuck you": ":("
"fuck you lumi": "Dont threaten me with a good time.",
"lumi fuck you": ":("
},
"eightball": [
"It is certain.",

View file

@ -9,7 +9,7 @@
"mod_ban": "\uD83D\uDC77 | **{0}** you successfully banned **{1}**.",
"mod_ban_dm": "\uD83D\uDC77 | **{0}** you have been banned from **{1}**.",
"ping": "\uD83C\uDFD3 | **{0}** I'm online.",
"restarting": "Restarting Racu...",
"restarting": "Restarting Lumi...",
"restart_error": "Error executing the script: {0}",
"intro_muted": "REMOVED STRING",
"intro_no_perms": "It seems that you don't have permission to do that!",
@ -40,7 +40,7 @@
"duel_results": "{1} wins **{2}{3}**\n{4} loses this bet.",
"duel_cancel": "**{0}** canceled the duel.",
"duel_time": "Time ran out.",
"stats_all_title": "Total Racu Stats - {0}",
"stats_all_title": "Total Lumi Stats - {0}",
"stats_all_footer": "Want to see your own stats? Do '/stats me'.",
"stats_games": "Games played: {0}",
"stats_games_valuet": "Games played: **{0}**\nGames won: **{1}**\nGames lost: **{2}**",

View file

@ -1,7 +1,7 @@
import json
import logging
logs = logging.getLogger('Racu.Core')
logs = logging.getLogger('Lumi.Core')
class JsonCache:

View file

@ -3,7 +3,7 @@ import os
import mariadb
_logs = logging.getLogger('Racu.Core')
_logs = logging.getLogger('Lumi.Core')
def create_connection_pool(name: str, size: int) -> mariadb.ConnectionPool:

View file

@ -7,10 +7,10 @@ from discord.ext import commands
from discord.ext.commands import Cog
from lib.embeds.error import GenericErrors, BdayErrors
from lib.exceptions import RacuExceptions
from lib.exceptions import LumiExceptions
logs = logging.getLogger('Racu.Core')
_logs = logging.getLogger('Racu.Core')
logs = logging.getLogger('Lumi.Core')
_logs = logging.getLogger('Lumi.Core')
async def on_command_error(ctx, error):
@ -47,11 +47,11 @@ async def on_command_error(ctx, error):
elif isinstance(error, (discord.CheckFailure, commands.CheckFailure)):
"""subclasses of this exception"""
if isinstance(error, RacuExceptions.NotAllowedInChannel):
if isinstance(error, LumiExceptions.NotAllowedInChannel):
await ctx.respond(content=f"You can only do that command in {error.command_channel.mention}.",
ephemeral=True)
elif isinstance(error, RacuExceptions.BirthdaysDisabled):
elif isinstance(error, LumiExceptions.BirthdaysDisabled):
await ctx.respond(embed=BdayErrors.birthdays_disabled(ctx))
else:
@ -74,7 +74,7 @@ class ErrorListener(Cog):
# on a prefix command, don't send anything if channel check fails. (to prevent spam in non-bot channels)
# current issues with this: await ctx.trigger_typing() is still invoked for 10 seconds.
if not isinstance(error, RacuExceptions.NotAllowedInChannel):
if not isinstance(error, LumiExceptions.NotAllowedInChannel):
await on_command_error(ctx, error)
log_msg = '[CommandHandler] %s executed .%s | PREFIX' % (ctx.author.name, ctx.command.qualified_name)

View file

@ -8,7 +8,7 @@ from lib.embeds.boost import Boost
import lib.embeds.boost
from services.GuildConfig import GuildConfig
_logs = logging.getLogger('Racu.Core')
_logs = logging.getLogger('Lumi.Core')
class EventHandler(Cog):

View file

@ -15,7 +15,7 @@ class ReactionHandler:
async def respond(message):
content = message.content.lower()
if (content.startswith("racu ") or content.startswith("racu, ")) and content.endswith("?"):
if (content.startswith("lumi ") or content.startswith("lumi, ")) and content.endswith("?"):
response = random.choice(_8ball)
await message.reply(content=response)

View file

@ -13,7 +13,7 @@ from services.xp_service import XpService, XpRewardService
_strings = JsonCache.read_json("strings")
_messages = JsonCache.read_json("levels")
_logs = logging.getLogger('Racu.Core')
_logs = logging.getLogger('Lumi.Core')
class XPHandler:

View file

@ -1,6 +1,6 @@
from discord.ext import commands
from lib.exceptions import RacuExceptions
from lib.exceptions import LumiExceptions
from services.GuildConfig import GuildConfig
@ -12,7 +12,7 @@ def birthdays_enabled():
guild_config = GuildConfig(ctx.guild.id)
if not guild_config.birthday_channel_id:
raise RacuExceptions.BirthdaysDisabled
raise LumiExceptions.BirthdaysDisabled
return True
@ -31,7 +31,7 @@ def allowed_in_channel():
command_channel = await ctx.bot.get_or_fetch_channel(ctx.guild, command_channel_id)
if ctx.channel.id != command_channel_id and command_channel:
raise RacuExceptions.NotAllowedInChannel(command_channel)
raise LumiExceptions.NotAllowedInChannel(command_channel)
return True

View file

@ -71,7 +71,7 @@ class GenericErrors:
@staticmethod
def owner_only(ctx):
embed = clean_error_embed(ctx)
embed.description += "this command requires Racu ownership permissions."
embed.description += "this command requires Lumi ownership permissions."
return embed

View file

@ -12,7 +12,7 @@ def get_latest_git_tag():
return "BETA"
__title__ = "Racu"
__title__ = "Lumi"
__version__ = get_latest_git_tag()
__author__ = "wlinator"
__license__ = "MIT License"

View file

@ -29,6 +29,6 @@ class ReactionHandler:
async def handle_message(self, message):
content = message.content.lower()
if (content.startswith("Racu ") or content.startswith("Racu, ")) and content.endswith("?"):
if (content.startswith("Lumi ") or content.startswith("Lumi, ")) and content.endswith("?"):
response = random.choice(self.eightball)
await message.reply(content=response)

View file

@ -7,7 +7,7 @@ from modules.admin import award, sql
class BotAdmin(commands.Cog, name="Bot Admin"):
"""
This module is intended for commands that only bot owners can do.
For server configuration with Racu, see the "config" module.
For server configuration with Lumi, see the "config" module.
"""
def __init__(self, client):

View file

@ -11,7 +11,7 @@ from modules.birthdays import upcoming, birthday
from services.Birthday import Birthday
from services.GuildConfig import GuildConfig
logs = logging.getLogger('Racu.Core')
logs = logging.getLogger('Lumi.Core')
data = JsonCache.read_json("birthday")
month_mapping = data["month_mapping"]
messages = data["birthday_messages"]

View file

@ -13,7 +13,7 @@ from modules.config import config, set_prefix, xp_reward
from services.GuildConfig import GuildConfig
strings = JsonCache.read_json("strings")
logs = logging.getLogger('Racu.Core')
logs = logging.getLogger('Lumi.Core')
class Config(commands.Cog):
@ -24,7 +24,7 @@ class Config(commands.Cog):
name="configuration",
aliases=["config"],
description="Show your server configuration.",
help="Shows information about how Racu is configured in your server. "
help="Shows information about how Lumi is configured in your server. "
"[Read the guide](https://wiki.wlinator.org/serverconfig).",
guild_only=True
)
@ -36,8 +36,8 @@ class Config(commands.Cog):
@bridge.bridge_command(
name="setprefix",
aliases=["sp"],
description="Set Racu's prefix.",
help="Set the prefix for Racu in this server. The maximum length of a prefix is 25.",
description="Set Lumi's prefix.",
help="Set the prefix for Lumi in this server. The maximum length of a prefix is 25.",
guild_only=True
)
@commands.guild_only()
@ -60,8 +60,8 @@ class Config(commands.Cog):
@bridge.bridge_command(
name="addxpreward",
aliases=["axpr"],
description="Add a Racu XP reward.",
help="Add a Racu XP reward. Read [the guide](https://wiki.wlinator.org/xprewards) before editing.",
description="Add a Lumi XP reward.",
help="Add a Lumi XP reward. Read [the guide](https://wiki.wlinator.org/xprewards) before editing.",
guild_only="True"
)
@commands.guild_only()
@ -72,8 +72,8 @@ class Config(commands.Cog):
@bridge.bridge_command(
name="removexpreward",
aliases=["rxpr"],
description="Remove a Racu XP reward.",
help="Remove a Racu XP reward. Read [the guide](https://wiki.wlinator.org/xprewards) before editing.",
description="Remove a Lumi XP reward.",
help="Remove a Lumi XP reward. Read [the guide](https://wiki.wlinator.org/xprewards) before editing.",
guild_only="True"
)
@commands.guild_only()
@ -136,7 +136,7 @@ class Config(commands.Cog):
@command_config.command(
name="channel",
description="Configure where members can use Racu commands."
description="Configure where members can use Lumi commands."
)
async def config_commands_channel(self, ctx, *, channel: discord.TextChannel):
guild_config = GuildConfig(ctx.guild.id)
@ -164,7 +164,7 @@ class Config(commands.Cog):
embed = discord.Embed(
color=discord.Color.orange(),
description=f"✅ | Server members can now use Racu commands in all channels. "
description=f"✅ | Server members can now use Lumi commands in all channels. "
)
guild_icon = ctx.guild.icon if ctx.guild.icon else "https://i.imgur.com/79XfsbS.png"
embed.set_author(name="Server Configuration", icon_url=guild_icon)
@ -419,7 +419,7 @@ class Config(commands.Cog):
@level_config.command(
name="disable",
description="Disable levels and the Racu XP system."
description="Disable levels and the Lumi XP system."
)
async def config_level_disable(self, ctx):
guild_config = GuildConfig(ctx.guild.id)
@ -428,7 +428,7 @@ class Config(commands.Cog):
embed = discord.Embed(
color=discord.Color.orange(),
description=f"✅ | The Racu XP system was successfully disabled."
description=f"✅ | The Lumi XP system was successfully disabled."
)
guild_icon = ctx.guild.icon if ctx.guild.icon else "https://i.imgur.com/79XfsbS.png"
embed.set_author(name="Server Configuration", icon_url=guild_icon)
@ -437,7 +437,7 @@ class Config(commands.Cog):
@level_config.command(
name="enable",
description="Enable levels and the Racu XP system."
description="Enable levels and the Lumi XP system."
)
async def config_level_enable(self, ctx):
guild_config = GuildConfig(ctx.guild.id)
@ -449,13 +449,13 @@ class Config(commands.Cog):
embed.set_author(name="Server Configuration", icon_url=guild_icon)
if guild_config.level_message_type != 0:
embed.description = "👍 | The Racu XP system was already enabled."
embed.description = "👍 | The Lumi XP system was already enabled."
return await ctx.respond(embed=embed)
else:
guild_config.level_message_type = 1
guild_config.push()
embed.description = f"✅ | The Racu XP system was successfully enabled."
embed.description = f"✅ | The Lumi XP system was successfully enabled."
embed.set_footer(text="Note: see '.help config' for more info.")
return await ctx.respond(embed=embed)

View file

@ -13,8 +13,8 @@ class Economy(commands.Cog):
@bridge.bridge_command(
name="balance",
aliases=["bal", "$"],
description="Shows your current Racu balance.",
help="Shows your current Racu balance. The economy system is global, meaning your balance will be synced in "
description="Shows your current Lumi balance.",
help="Shows your current Lumi balance. The economy system is global, meaning your balance will be synced in "
"all servers.",
guild_only=True
)

View file

@ -14,7 +14,7 @@ from services.BlackJackStats import BlackJackStats
from services.Currency import Currency
resources = JsonCache.read_json("resources")
logs = logging.getLogger('Racu.Core')
logs = logging.getLogger('Lumi.Core')
est = pytz.timezone('US/Eastern')
active_blackjack_games = {}

View file

@ -17,7 +17,7 @@ async def cmd(self, ctx, game):
total_bet = Currency.format_human(stats["total_bet"])
total_payout = Currency.format_human(stats["total_payout"])
# output = f"{ctx.author.name}'s racu stats\n\n"
# output = f"{ctx.author.name}'s lumi stats\n\n"
output = strings["stats_blackjack"].format(
stats["amount_of_games"],
total_bet,

View file

@ -10,11 +10,11 @@ class Help(commands.Cog):
@commands.slash_command(
name="help",
description="Get Racu help.",
description="Get Lumi help.",
)
async def help_command(self, ctx):
prefix = lib.formatter.get_prefix(ctx)
return await ctx.respond(content=f"Please use Racu's prefix to get help. Type `{prefix}help`", ephemeral=True)
return await ctx.respond(content=f"Please use Lumi's prefix to get help. Type `{prefix}help`", ephemeral=True)
def setup(client):

View file

@ -25,7 +25,7 @@ class Levels(commands.Cog):
@bridge.bridge_command(
name="leaderboard",
aliases=["lb", "xplb"],
description="See the Racu leaderboards.",
description="See the Lumi leaderboards.",
help="Shows three different leaderboards: levels, currency and daily streaks.",
guild_only=True
)

View file

@ -7,7 +7,7 @@ from services.Currency import Currency
from services.Dailies import Dailies
from services.xp_service import XpService
logs = logging.getLogger('Racu.Core')
logs = logging.getLogger('Lumi.Core')
async def cmd(ctx):
@ -66,7 +66,7 @@ class LeaderboardCommandOptions(discord.ui.Select):
),
discord.SelectOption(
label="Currency",
description="Who is the richest Racu user?",
description="Who is the richest Lumi user?",
value="currency",
emoji="💸"
),

View file

@ -31,8 +31,8 @@ class Misc(commands.Cog):
@bridge.bridge_command(
name="uptime",
description="See Racu's uptime since the last update.",
help="See how long Racu has been online since his last update.",
description="See Lumi's uptime since the last update.",
help="See how long Lumi has been online since his last update.",
)
@checks.allowed_in_channel()
async def uptime(self, ctx):
@ -42,7 +42,7 @@ class Misc(commands.Cog):
@bridge.bridge_command(
name="invite",
description="Generate an invite link.",
help="Generate a link to invite Racu to your own server!"
help="Generate a link to invite Lumi to your own server!"
)
@checks.allowed_in_channel()
async def invite_command(self, ctx):
@ -62,8 +62,8 @@ class Misc(commands.Cog):
@bridge.bridge_command(
name="info",
aliases=["stats"],
description="Shows basic Racu stats.",
help="Shows basic Racu stats."
description="Shows basic Lumi stats.",
help="Shows basic Lumi stats."
)
@checks.allowed_in_channel()
async def info_command(self, ctx):
@ -76,7 +76,7 @@ class Misc(commands.Cog):
guild_only=False,
description="This command can only be used in DMs.",
help="Introduce yourself. For now this command "
"can only be done in ONE server and only in Racu's DMs."
"can only be done in ONE server and only in Lumi's DMs."
)
@commands.dm_only()
async def intro_command(self, ctx):

View file

@ -5,7 +5,7 @@ from datetime import datetime
import dropbox
logs = logging.getLogger('Racu.Core')
logs = logging.getLogger('Lumi.Core')
oauth2_refresh_token = os.environ.get("RACU_DBX_OAUTH2_REFRESH_TOKEN")
app_key = os.environ.get("RACU_DBX_APP_KEY")
@ -27,7 +27,7 @@ else:
async def create_db_backup(dbx, path="db/rcu.db"):
backup_name = datetime.today().strftime('%Y-%m-%d_%H%M')
backup_name += f"_racu.sql"
backup_name += f"_lumi.sql"
command = f"mariadb-dump --user={mariadb_user} --password={mariadb_password} " \
f"--host=db --single-transaction --all-databases > ./db/init/2-data.sql"

View file

@ -10,7 +10,7 @@ from lib import metadata
from services.BlackJackStats import BlackJackStats
from services.Currency import Currency
_logs = logging.getLogger('Racu.Core')
_logs = logging.getLogger('Lumi.Core')
_art = JsonCache.read_json("art")
_data = JsonCache.read_json("resources")

View file

@ -9,7 +9,7 @@ from lib.embeds.error import MiscErrors, IntroErrors
from lib.embeds.intro import General, Questions
resources = JsonCache.read_json("resources")
logs = logging.getLogger('Racu.Core')
logs = logging.getLogger('Lumi.Core')
async def cmd(self, ctx: discord.ApplicationContext):

View file

@ -5,7 +5,7 @@ from discord.ui import View
from lib.embeds.info import MiscInfo
logs = logging.getLogger('Racu.Core')
logs = logging.getLogger('Lumi.Core')
url = "https://discord.com/oauth2/authorize?client_id=1038050427272429588&permissions=8&scope=bot"
@ -19,5 +19,5 @@ async def cmd(ctx):
class InviteButton(View):
def __init__(self):
super().__init__(timeout=None)
invite_button = discord.ui.Button(label="Invite Racu", style=discord.ButtonStyle.url, url=url)
invite_button = discord.ui.Button(label="Invite Lumi", style=discord.ButtonStyle.url, url=url)
self.add_item(invite_button)

View file

@ -6,7 +6,7 @@ from lib import formatter
from lib.embeds.moderation import ModEmbeds, ModErrors
from modules.moderation import functions
_logs = logging.getLogger('Racu.Core')
_logs = logging.getLogger('Lumi.Core')
async def ban_user(cog, ctx, target: discord.User, reason):

View file

@ -1,7 +1,7 @@
import discord
from discord.ext.commands import BadArgument
from lib.exceptions import RacuExceptions
from lib.exceptions import LumiExceptions
def actionable(target: discord.Member, invoker: discord.Member, bot_user: discord.Member) -> None:
@ -20,7 +20,7 @@ def actionable(target: discord.Member, invoker: discord.Member, bot_user: discor
raise BadArgument("you can't ban yourself.")
if target.top_role >= invoker.top_role and invoker != invoker.guild.owner:
raise RacuExceptions.UserHierarchy
raise LumiExceptions.UserHierarchy
elif target.top_role >= bot_user.top_role:
raise RacuExceptions.BotHierarchy
raise LumiExceptions.BotHierarchy

View file

@ -7,10 +7,10 @@ from discord.ext import bridge
from lib import metadata
logs = logging.getLogger('Racu.Core')
logs = logging.getLogger('Lumi.Core')
class RacuBot(bridge.Bot):
class LumiBot(bridge.Bot):
async def on_ready(self):
logs.info("-------------------------------------------------------")
logs.info(f"[INFO] {metadata.__title__} v{metadata.__version__}")

View file

@ -7,7 +7,7 @@ from lib.embeds.error import HelpErrors
art = JsonCache.read_json("art")
class RacuHelp(commands.HelpCommand):
class LumiHelp(commands.HelpCommand):
def __init__(self, **options):
super().__init__(**options)
@ -30,9 +30,9 @@ class RacuHelp(commands.HelpCommand):
"Full list of commands: https://wiki.wlinator.org/cmdlist"
)
for cog, racu_commands in mapping.items():
for cog, lumi_commands in mapping.items():
filtered = await self.filter_commands(racu_commands, sort=True)
filtered = await self.filter_commands(lumi_commands, sort=True)
if command_signatures := [
self.get_command_qualified_name(c) for c in filtered

View file

@ -3,7 +3,7 @@ import logging
from db import database
from services import Item
logs = logging.getLogger('Racu.Core')
logs = logging.getLogger('Lumi.Core')
class Inventory:

View file

@ -3,7 +3,7 @@ import sqlite3
from db import database
logs = logging.getLogger('Racu.Core')
logs = logging.getLogger('Lumi.Core')
class Item:

View file

@ -7,7 +7,7 @@ from logging.handlers import RotatingFileHandler
import pytz
class RacuFormatter(logging.Formatter):
class LumiFormatter(logging.Formatter):
def __init__(self, fmt=None, datefmt=None):
super().__init__(fmt, datefmt)
self.timezone = pytz.timezone('US/Eastern')
@ -40,7 +40,7 @@ def setup_logger():
pass
# Initialize the logger
logger = logging.getLogger('Racu.Core')
logger = logging.getLogger('Lumi.Core')
if logger.handlers:
# Handlers already exist, no need to add more
@ -51,7 +51,7 @@ def setup_logger():
# CONSOLE HANDLER
console_handler = logging.StreamHandler()
console_handler.setLevel(logging.INFO)
console_formatter = RacuFormatter('[%(asctime)s] [%(name)s] %(message)s',
console_formatter = LumiFormatter('[%(asctime)s] [%(name)s] %(message)s',
datefmt='%Y-%m-%d %H:%M:%S')
console_handler.setFormatter(console_formatter)
@ -61,7 +61,7 @@ def setup_logger():
max_log_size_bytes = 10 * 1024 * 1024 # max. 10 MB
debug_file_handler = RotatingFileHandler(debug_log_file, maxBytes=max_log_size_bytes, backupCount=5)
debug_file_handler.setLevel(logging.DEBUG)
debug_file_formatter = RacuFormatter('[%(asctime)s] [%(name)s] [%(levelname)s] %(message)s',
debug_file_formatter = LumiFormatter('[%(asctime)s] [%(name)s] [%(levelname)s] %(message)s',
datefmt='%Y-%m-%d %H:%M:%S')
debug_file_handler.setFormatter(debug_file_formatter)
logger.addHandler(debug_file_handler)