Skip to content

Relative order of messages and keywords is not preserved in log #2086

Closed

Description

@pekkaklarck

If a keyword has both messages and child keywords, they are always show in logs so that keywords are first. The reason this issue isn't typically seen is that most of the time keywords only have either child keywords or messages, not both. There are, however, at least two cases where both keywords and messages exists:

  • When using --loglevel trace, all keywords get trace level messages logging arguments and return values. With user keywords both of these messages are listed after child keywords although arguments are logged before executing them.
  • Wait Until Keyword Succeeds and some other special keywords that execute other keywords also log messages. All these messages are shown after all executed keywords.

Notice that a related problem that Rebot messed up the order when reading output.xml (#1867) has already been fixed. Fixing logs may unfortunately be a lot harder.

Activity

  1. added this to the 3.0 milestone on Aug 20, 2015
  2. pekkaklarck commented on Dec 29, 2015

    @pekkaklarck
    MemberAuthor

    No time for this in 3.0. Changes to log aren't backwards incompatible so this can be considered also in 3.0.x minor versions. The main problem is that required changes to Javascript code are quite big and thus need to be tested with various browsers and on various operating systems. Good thing is that we ought to be able to forget about IE 8 at this point.

  3. removed this from the 3.0 milestone on Dec 29, 2015
  4. changed the title [-]Relative order of messages and keywords are not preserved in logs[/-] [+]Relative order of messages and keywords is not preserved in log[/+] on Feb 10, 2020
  5. stdedos commented on Feb 12, 2020

    @stdedos
    Contributor

    Well ... not exactly.

    Why not have them at the order they arrived i.e. Arguments first, Return last, and everything else in-between?

  6. pekkaklarck commented on Feb 12, 2020

    @pekkaklarck
    MemberAuthor

    Of course kws/msgs should be in the order they occurred, that's what this issue is all about, but it's hard to fix and nobody has done it yet. Changing logic so that msgs are before kws would be trivial.

  7. stdedos commented on Feb 12, 2020

    @stdedos
    Contributor

    Changing logic so that msgs are before kws would be trivial.

    I guess it could be a workaround; I'd prefer, however, that applying the workaround doesn't mean that this issue is abandoned.

  8. pekkaklarck commented on Jan 12, 2021

    @pekkaklarck
    MemberAuthor

    Recent refactoring to the internal model (#3749) has made fixing this problem relatively easy. Tests and keywords nowadays have generic body that contains keywords and control structures (FOR and IF). On the execution result side we can use the same body to store also messages then order of all body items is automatically preserved on the Python side. After that we need to change converting the Python model to JS model so that the whole body is stored in one structure keeping items in order. Then log.html needs to be changed so that it can handle the new model and also draw body items in correct order.

    I already have a prototype working locally but it still needs some cleanup work. I'll target this to RF 4.0 scope and hope to get it into beta 2.

  9. added this to the v4.0 milestone on Jan 12, 2021
  10. stdedos commented on Jan 12, 2021

    @stdedos
    Contributor

    I wish I could've updated to v4 😕 😞

    Thank you for pursuing this anyway 😀

  11. pekkaklarck commented on Jan 14, 2021

    @pekkaklarck
    MemberAuthor

    RF 4.0 isn't out yet and these changes aren't yet even in any beta. There's still some work left with #3749 but then it's definitely time for RF 4.0 beta 2.

  12. added theissue type on Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions