```absl::InitializeLog()``` Error

Error i got from console:
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR I0000 00:00:1721403125.869618 1012 config.cc:230] gRPC experiments enabled: call_status_override_on_cancellation, event_engine_dns, event_engine_listener, http2_stats_fix, monitoring_experiment, pick_first_new, trace_record_callops, work_serializer_clears_time_cache

Welcome @MoonVatality_HUB

Sharing the code that led to this would be very helpful for us to understand what’s going wrong.

Hello! Thanks for respond, If you need the code here you go:

# Space for Gemini
# Initialize logging
absl.logging.set_verbosity(absl.logging.INFO)

# Initialize logging
logging.basicConfig(level=logging.INFO)

# Load environment variables from .env file
load_dotenv()

# Access environment variables
api_key = os.getenv("API_KEY")
if api_key is None:
    raise ValueError("API_KEY environment variable not set")

genai.configure(api_key=api_key)

model = genai.GenerativeModel('gemini-1.5-flash', 
    safety_settings={
        HarmCategory.HARM_CATEGORY_HATE_SPEECH: HarmBlockThreshold.BLOCK_NONE,
        HarmCategory.HARM_CATEGORY_HARASSMENT: HarmBlockThreshold.BLOCK_NONE,
        HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT: HarmBlockThreshold.BLOCK_NONE,
        HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT: HarmBlockThreshold.BLOCK_NONE,
    }
)

@bot.command(name = "askai")
async def askai(ctx: commands.Context, *, prompt: str):
    response = model.generate_content(prompt)
    await ctx.send(response.text)

Welcome to the forms, and thanks for the code sample!

Exaclty what language is this and what library are you using?
Which line in the example caused the error?

This looks like an issue with how you’ve implemented the logging library.

The log messages are being written to STDERR before the library is initialised, which is why you’re getting a warning instead of an error.