x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Temporarily disable log

Is there a way to temporarily disable logs?

My real issue is : When I try to load an object by its path, i.e. using StaticLoadObject(), even if I set the flag LOAD_NoWarn, the linker will log something when the object is not found.

That is not a good thing, because as I call this function every frame, logs get over 10Mo.

I tried to set LogLinker's verbosity to ELogVerbosity::NoLogging, but it caused unresolved external errors, because the LogLinker's definition is in a private file.

Product Version: Not Selected
Tags:
more ▼

asked Jul 06 '16 at 02:52 PM in C++ Programming

avatar image

Evols
119 12 11 16

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

To temporarily disable a certain category, you can use these console commands :

 Log [LogCategory] off

or you can add this to your DefaultEngine.ini or Engine.ini

 [Core.Log]
 LogLinker=all off

to reenable it just change off to on (or if you choose to use the ini file, just remove the entry)

more ▼

answered Jul 06 '16 at 04:26 PM

avatar image

Heapcleaner
536 15 5 19

avatar image Evols Jul 06 '16 at 04:48 PM

The first solution, i.e. using GetWorld()->Exec(GetWorld(), TEXT("Log LogLinker off"));doesn't work for me. However, editing the INI files did work, so thank you !

avatar image Heapcleaner Jul 06 '16 at 05:09 PM

Hmm.. that's weird, but I have never used c++ function to execute log console commands. Maybe it's not working because logging function is not related to world and when the local player receive the command it doesn't know what to do with it, logging console commands can technically be executed as soon as the engine has been initialized. I usually call it in editor (non-pie) to change the logging verbosity in one editor session, there are a couple of logging console commands, you can just type 'log' in console and it will give you a lot of information about logging commands.

avatar image Evols Jul 06 '16 at 05:54 PM

Anyway, that's not a problem anymore for me, using INI files works perfectly. Thank you a lot !

avatar image Gildor Nov 12 '18 at 11:24 AM

GetWorld()->Exec() didn't work for me either. However, using

 GEngine->Exec(nullptr, TEXT("log <category_name> off"));

worked well. I'm temporarily disabling log, then calling the same command with "reset" word instead of "off" to restore old value.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question