HISTORIAN Rayford W. Logan grew up in Washington early in this century - at a time when blacks were barred from downtown hotels, restaurants and barber shops. Theaters only admitted blacks to upstairs segregated sections.

In 1912, when Woodrow Wilson was elected and Logan was 15, conditions grew worse. Black and white employees in the Post Office and Treasury departments were given separate work areas. Blacks were forbidden to eat with whites or use the same toilets. Wilson dismissed all but two blacks appointed by William Howard Taft to District and federal offices and replaced them with whites.

The specter of racial prejudice hung over all Afro-Americans, but it was particularly galling to black intellectuals trying to reconcile the social restraints of segregation with their impulse to become involved in the world of ideas. No matter how high a level of excellence they achieved in racially separate surroundings, they knew their social energy could be deflated simply by the reminder of race.

Logan, who recently turned 80 and was chairman of the Howard University history departmetn between 1942 and 1964, has writtne a variety of books, including "The Betrayal of the Negro: From Rutherford B. Hayes to Woodrow Wilson," "Haiti and the Dominican Republic," "Howard University: The First Hundred Years, 1867-1967."

John Hope Franklin, one of the country's leading historians and professor of history at the University of Chicago, says Logan has written on a broader range of topics than most black historians.

Logan was part of that generation of Afro-American scholars who matured in the 1920s and 1930s and felt frustrated at having their intellectual and personal activities restricte because of race.

"From my boyhood days to the present time I've been weighing the advantages and disadvantages of segregation," Logan says. "And I concluded there is no one general rule because it varies from city to city and from time to time. The goal should be intergration. It's not going to be easy to achieve that. I'm concerned about the likelihood that segregation is going to continue in many aspects of life."

Logan grew up in a racially mixed neighborhood. The historian recalls that when his family moved to 818 22d St. NW, "We almost constituted an invasion and some of the white boys in the neighborhood tried to make trouble for us."

Logan says he experienced no serious racial incidents in Washington on the magnitude of those he knew in later life.

His father, Arthur Charles Logan, originally from Greenwood, S.C., was a butler. His mother, Martha Ann Whittingham, of Hume, Va., was a laundress.

Logan attended the old M Street High School, which, along with Dunbar High School, formed the cream of the city's secondary schools for blacks. Patterned after the older New England academies, the school's curriculum included four years of Latin, two years of Greek, a series of courses in mathematics, English and modern foreign languages.

Some of his teachers, including historian Carter G. Woodson (founder of Black History Week, now expanded to cover the whole month of February) had Ph. Ds. They taught at M Street School because of its reputation and because salaries were higher than those they could command at colleges.

"Looking backward I have no hestiation in saying that at time, since integrated schools particularly were out of consideration, segregation in Washington helped make the public schools some of the best in the nation," Logan says.

"I am probably one of the oldest survivors of Stevens School. And to see Amy Carter going there is something that no one in my boyhood days would have thought possible."

Logan wrote profusely, imbued his students with a commitment to learning, lectured on civil rights to groups outside the university, lobbied for African home rule in the 1920s and played a key role in the threatened march on Washington in 1941 that led to the outlawing of racial discrimination in the defense industry.

He wrote books about Latin America, Africa and various aspects of Afro-American history. Still, he felt the sting of racial discrimination - at Williams College, at Harvard, in the Army in World War I.

He got a different perception of segregation at Williams. Longan wanted to take part in the mainstream of American life, but the social world for black students was restricted.

And his life grew more miserable as an Army first lieutenant in France during World War I. His military experience was so bitter that he lived in exile in Paris for five years following his discharge in 1919.

Black officers were forced to eat at separate tables during entertainment on the troop ship he rode from the United States to Europe. Logan tried to talk his fellow black officers out of acquiescing.

On landing at Nazaire, the black and white officers were first billeted in separate barracks, recalled Logan. The barracks of the blacks was in disrepair, so they moved in with the whites - separated, however, by a curtain suspended from the ceiling to the floor.

The crusher came at Montoyre. Longan asked a non-commissioned officer where the officers' mess was and was told that blacks were not allowed to eat there. However, he was offered lunch at the NCO mess. He accepted, but was hardly through when he was summoned to camp headquarters and severely reprimanded for eating with NCO's.

"I wept like a baby," he recalls. " I believe that if I had a gun I would have shot him. The war to make the world safe for democracy. Hummph! You want to hear any more. I've got plenty of them. Those kind of experiences continued until I was discharged on Aug. 21, 1919."

While in post-war Europe, Logan lived the life of a bon vivant. He once wrote: "I enjoyed the theater, the mock bull fight, came down to dinner every evening in tuxedo, as did the other guests, had a bank telephone me the quotations from the Bourse, played bridge and billiards."

He did not return to this country until late 1924. Adjustment was difficult even though he worked in a largely all-black situation at Virginia Union College in Richmond. He said he went into deep depression.

Then came a breakthrough. One of his Williams College classmates, Roger William Riis, son of writer Jacob Riis, invited and paid for his trip to their class' 10th reunion in 1927. "That event, perhaps more than anything else, led me to believe that there was a possibility for Negroes to fight it out here," says Logan.

The historian met W.F.B. DuBois in Paris in 1921 at the second Pan African Congress, which the latter had convened. Logan served as interpreter of the congress and was elected deputy secretary of the Pan African Association established after the meetings.

To this day, Logan says that DuBois, scholar, political writer and activist, was his greatest intellectual influence - and friend for decades.

He had admired the older man since high school, particularly for DuBois' advo cacy of libera arts education for blacks as opposed to Booker T. Washington's espousal of manual arts and agricultural training.

Logan identified with DuBois in many facets of life. He recalls running the half-mile on his high school track team. In a track meet held at Howard, he and a runner from Armstrong Technical High School were rounding a turn, when the Armstrong man said, "You need't worry, Ray, you'll come in second."

Continues Logan: "I beat him. And used to tell my students, 'That wasn't Ray Logan beating that guy - it was W.E.B. DuBois beating Booker T. Washington."'

At 5 feet 7 and 135 pounds, the historian is still compact. He keeps his weight down by working hard and eating well. He's generally up by 6:30 a.m. and after fixing breakfast for himself, works from 8:30 until noon. Following lunch, he returns to work at 2:30 and stays busy at his desk until 5:30, when he watches the evening news and prepares for bed.

Fellow historian John Hope Franklin, who's 61, says, laughing, "Rayford Logan works harder than I do, and be's got a few years on me."

Logan is at his Van Ness Center area home alone. His wife, Ruth, died in 1966.

Logan is spending most of his time working on the "Dictionary of American Negro Biography," which he and Dr. Michael Winston of Howard University are editing. They expect it to be published in early 1978.

"The book will be the first of its kind," says Logan. "It will give factual, scholary documented information about Negro men and women and that information will be a source of surprise to many persons. Negroes and especially whites will have a different perception about the ability of Negroes to achieve in various fields."

The historian is also working on a revision of the second draft of his autobiography. The book will trace him from his birth at 1731 Seaton Pl. NW to the present.

In the book, drawn in part from daily diaries he kept between 1940 and 1970, Logan says he will give a complete account of his role in President Franklin Roosevelt's issuance of Executive Order 8802, which outlawed racial discrimination in the defense industry, a participation not heretofore acknowledged.

So Logan is finishing two books and even has others in mind, in spite of recent poor health.

He also likes to look back on his days as a teacher. He said he is most proud as former Howard history department chairman of bringing in John Hope Franklin as a professor. Logan said he believes he hired the first whites to teach in the department. And he started a series of master's theses dealing with the portrayal of Afro-Americans in representative magazines and newspapers.

And there are his former students - John W. Blassingame, a history professor at Yale, Joseph Harris, chairman of the Howard history department, Lorraine Williams, vice president for academic affairs at Howard, Mary Berry, chancellor of the University of Colorado and Assistant Secretary-designate of Hew.

"I'm inclined to believe that some of the good students came to Howard because they knew I was there," he smiles.