title: Customising log4j logging for sensitive data
body: <p>I have a class which contains sensitive information (Credit card info, phone numbers etc).</p>
  
  <p>I want to be able to pass this class to log4j, but have it obscure certain information.</p>
  
  <p>If I have a class UserInformation which has getPhoneNumber, getCreditCardNumber methods, how would I customise log4j or this class so that it will obscure the numbers correctly.</p>
  
  <p>I want the credit card number to be output as xxxx-xxxx-xxxx-1234 and the phone number to be output as xxxx-xxx-xxx given that these would be 1234-1234-1234-1234 and 1234-567-890</p>
  
  <p>Thanks</p>