<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_arguments(parser, default_level=logging.INFO):

 	"""
 	Add arguments to an ArgumentParser or OptionParser for purposes of
 	grabbing a logging level.
 	"""

	adder = (
		getattr(parser, 'add_argument', None)
		or getattr(parser, 'add_option')
	)
	adder(
		'-l', '--log-level', default=default_level, type=log_level,
		help="Set log level (DEBUG, INFO, WARNING, ERROR)")