New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce CCM-101 Exam - Topic 9 Question 61 Discussion

Actual exam question for Salesforce's CCM-101 exam
Question #: 61
Topic #: 9
[All CCM-101 Questions]

Business Manager has the configuration:

* Active Log category is "root"

* Log level of WARN

The code below is executing:

var log = Logger.getLogger(''products'');

Using this information, what will be written to the log?

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

0/2000 characters
Audry
2 months ago
Totally with you on A, that makes the most sense!
upvoted 0 times
...
Shaun
3 months ago
Definitely A, both messages should show up.
upvoted 0 times
...
Karan
3 months ago
I think B is correct, but not sure about the info message.
upvoted 0 times
...
Refugia
3 months ago
Wait, why would log.info even be considered here?
upvoted 0 times
...
Gabriele
3 months ago
Only WARN and ERROR messages will be logged.
upvoted 0 times
...
Bulah
3 months ago
I feel like I might be mixing up the log levels. I know WARN should log WARN and ERROR, but I can't remember if INFO is included. A seems likely, but I’m not completely confident.
upvoted 0 times
...
Thora
4 months ago
I practiced a similar question, and I think only the WARN and ERROR messages would be captured. A seems like the right choice, but I'm still a bit confused.
upvoted 0 times
...
Ellen
4 months ago
I'm not entirely sure, but I think INFO messages won't be logged at all since the level is set to WARN. So, B and C might not be correct.
upvoted 0 times
...
Ivette
4 months ago
I remember that with the log level set to WARN, only WARN and ERROR messages should be logged. So, I think A is a possibility.
upvoted 0 times
...
Marya
4 months ago
I've got a strategy for this. Since the log level is set to WARN, only messages at the WARN level or higher (i.e., ERROR) will be logged. So the answer should be A - both the WARN and ERROR messages will be written to the log.
upvoted 0 times
...
King
4 months ago
I'm a bit confused on this one. The code is using the "products" logger, but the active log category is "root". Does that mean the "products" logger will still be affected by the "root" log level? I'll need to double-check the logging framework documentation.
upvoted 0 times
...
Mitzie
5 months ago
Okay, let's see here. The active log category is "root" and the log level is set to WARN. So I'm thinking only the warn and error messages will be logged, not the info message.
upvoted 0 times
...
Malcom
5 months ago
Hmm, this looks like a tricky one. I'll need to carefully consider the log level and category settings to figure out what gets written.
upvoted 0 times
...
Carmen
11 months ago
Ah, I see what's going on here. Since the log level is set to WARN, the 'log.warn' message will be written, but the 'log.error' message will be suppressed. So the answer is A.
upvoted 0 times
Jeff
10 months ago
Correct! The answer is A, as only the 'log.warn' message will be written to the log.
upvoted 0 times
...
Celeste
10 months ago
That's right! The 'log.error' message will be suppressed because it is below the WARN level.
upvoted 0 times
...
Emogene
10 months ago
Exactly! The log level is set to WARN, so only the 'log.warn' message will be written.
upvoted 0 times
...
...
Maira
11 months ago
Haha, I bet the answer is C. Imagine the poor developer who has to debug this code, they're gonna be scratching their heads like 'Wait, why is the info message being logged instead of the warn message?'
upvoted 0 times
Brice
10 months ago
I agree, it's important to pay attention to the log configurations.
upvoted 0 times
...
Shala
10 months ago
Yeah, it does seem like a tricky situation for the developer.
upvoted 0 times
...
Malcom
10 months ago
I think you might be onto something with option C.
upvoted 0 times
...
...
Malinda
11 months ago
I think the answer is A because the log level is set to WARN, so both warn and error messages will be logged.
upvoted 0 times
...
Galen
11 months ago
I'm not sure, but I think the log level of WARN will only log warn messages.
upvoted 0 times
...
Dean
12 months ago
I disagree, I believe the answer is B.
upvoted 0 times
...
Gail
12 months ago
I think the answer is A.
upvoted 0 times
...
Sunshine
12 months ago
Wait, what? The code is using 'Logger.getLogger('products')', but the log level is set to 'root'. Shouldn't it be checking the log level for the 'products' logger instead? This is a tricky one.
upvoted 0 times
Chu
11 months ago
Wait, what? The code is using 'Logger.getLogger('products')', but the log level is set to 'root'. Shouldn't it be checking the log level for the 'products' logger instead?
upvoted 0 times
...
Jesus
11 months ago
B) log.error(`This is an error message`); AND log.info(`This is an info message`);
upvoted 0 times
...
France
11 months ago
A) log.warn(`This is a warn message`); AND log.error(`This is an error message`);
upvoted 0 times
...
...
Art
12 months ago
Well, the question states that the log level is set to WARN, so I would expect to see the 'log.warn' message, but not the 'log.error' message. I guess option A is the correct answer.
upvoted 0 times
Celia
11 months ago
Let's go with option A then, it makes the most sense based on the configuration.
upvoted 0 times
...
Laurel
11 months ago
I think option B is incorrect because it includes an 'error' message which won't be logged.
upvoted 0 times
...
Dong
11 months ago
Yeah, the log level is set to WARN so only the 'log.warn' message will be written.
upvoted 0 times
...
Werner
11 months ago
I agree, option A seems to be the correct answer.
upvoted 0 times
...
...

Save Cancel