# Unreal Engine Community Wiki Authors - Logging (Highlights) ![rw-book-cover|256](https://readwise-assets.s3.amazonaws.com/static/images/article2.74d541386bbf.png) ## Metadata **Cover**:: https://readwise-assets.s3.amazonaws.com/static/images/article2.74d541386bbf.png **Source**:: #from/readwise **Zettel**:: #zettel/fleeting **Status**:: #x **Authors**:: [[Unreal Engine Community Wiki Authors]] **Full Title**:: Logging **Category**:: #articles #readwise/articles **Category Icon**:: 📰 **URL**:: [unrealcommunity.wiki](https://unrealcommunity.wiki/logging-lgpidy6i) **Host**:: [[unrealcommunity.wiki]] **Highlighted**:: [[2022-03-17]] **Created**:: [[2022-09-26]] ## Highlights - Logging with Multiple Specifiers code ```cpp UE_LOG(LogTemp, Warning, TEXT("Current values are: vector %s, float %f, and integer %d"), *YourVector.ToString(), YourFloat, YourInteger); ``` - If your Play-In-Editor session has ended, you can find the full log of that session in YourProjectName\\Saved\\Logs folder. - You can see the log output in real time while playing in Editor in the Output Log tab. If it is not open by default, you can find it under Window-\>Developer Tools-\>Output Log. - If you have an executable, you can create a shortcut with -Log at the end of its name to open the log as you launch the executable. - You can open the console when your game is running by pressing the tilde (\~) key and access the log by typing in the console command showlog and pressing the Enter key. - You can define a new log category by putting these two snippets wherever you need to use this log category. You could put these inside their own file, and #include it wherever you need it. These should be at the top level of your code, not inside any functions or classes. Header File ``` DECLARE_LOG_CATEGORY_EXTERN(LogCustom, Log, All); ``` Cpp File ``` DEFINE_LOG_CATEGORY(LogCustom); ``` - However, it is often more convenient than using a log message when developing and/or debugging as it allows you to see the message in the game window without needing to have a separate window open for the log. code ```cpp GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::White, TEXT("This message will appear on the screen!")); ```