Welcome to the Linux Foundation Forum!

Lab 4-2: ...[warn]: #0 unknown placeholder `${record["password"].gsub(/./,"*")}` found

Posts: 37
edited May 2022 in LFS242 Class Forum

Anyone else encountering this warn? Doesn't looks like the substitution is occuring.

  1. # Lab 4-2
  2. <source>
  3. @type forward
  4. </source>
  5.  
  6. <filter lab4**>
  7. @type record_transformer
  8. <record>
  9. status filtered
  10. filter processed - ${record["lfs242"]}
  11. password ${record["password"].gsub(/./,"*")}
  12. </record>
  13. remove_keys lfs242
  14. </filter>
  15.  
  16. <match>
  17. @type stdout
  18. </match>

Comments

  • I was able to get this to work by adding the key enable_ruby to the <filter> directive.

    1. # Lab 4-3
    2. <source>
    3. @type forward
    4. </source>
    5.  
    6. <filter lab4**>
    7. @type record_transformer
    8. <record>
    9. status filtered
    10. filter processed - ${record["lfs242"]}
    11. password ${record["password"].gsub(/./,"*")}
    12. </record>
    13. remove_keys lfs242
    14. enable_ruby
    15. </filter>
    16.  
    17. <match>
    18. @type stdout
    19. </match>
  • Posts: 37

    ah, thank you. i missed that code somehow.

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training