It needs to be depend on the Perception.

The same way damage is tied to Strenght or Dexterity. Or Magic to Intelligence.
It isnt guesswork at all. and this would make it feel very natural and sensible. Plus it would add one more smaller nice feature to Perception.

Just letting players see exact enemy levels without any requirement whatsoever is cheap "making it easier" mechanic that results in metagming - "i wont take on those because i see they are this exact level and im this exact level".

If you get whooped in an overwhelming way - you can tell that easily without such spoilers.
You dont need to see enemy levels to know youve been destroyed without a chance to win.
You can tell that directly from being killed really fast and also from the fact that you are not dealing much damage to the enemy at all.

Those two effects are the direct feedback pointers.

Seeing enemy levels is just a small addition to it. Its not that important at all and therefore it could be easily made to depend on one of the main attributes as an additional ease of use feedback mechanic.